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
    ProxyCommand none

Host bastion2.eqiad.wmflabs
    ProxyCommand none

Host bastion3.eqiad.wmflabs
    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 name
  • 8080 — local port
  • 9090 — remote port, the server administration interface is listening to

Then simply go to http://localhost:8080/


Make sure

  • that on your local machine nothing is listening already to port 8080
  • that the administration interface is really running