Chemical Markup support for Wikimedia Commons/Internship Report/Port forwarding through SSH
Consider you have a Web-Server running on an instance of a WMF-Labs project. That server serves Web pages to port 80 but you do not want to expose the config interface served on port 9090.
First, set up the proxy tunnel through bastion (replace rillke
with your user name):
vim ~/.ssh/config
Host bastion1.eqiad.wmflabs Hostname bastion.wmflabs.org ProxyCommand none Host bastion2.eqiad.wmflabs Hostname bastion2.wmflabs.org ProxyCommand none Host bastion3.eqiad.wmflabs Hostname bastion3.wmflabs.org ProxyCommand none Host *.eqiad.wmflabs ProxyCommand ssh -a -W %h:%p bastion1.eqiad.wmflabs Host *.wmflabs User rillke
Then, simply tunnel the port
ssh -N mediahandler-tests-static.eqiad.wmflabs -L 8080:localhost:9090
mediahandler-tests-static
— instance name8080
— local port9090
— remote port, the server administration interface is listening to
Then simply go to http://localhost:8080/
TroubleshootingEdit
Make sure
- that on your local machine nothing is listening already to port 8080
- that the administration interface is really running