You have SSH access to a server and need to access a web admin (or any protocol) on a non-public port.
For example, you want to access a Solr admin on port 8983
but the server's firewall only allows port 80
and 22
. Rather than opening a port in the server's firewall we can just create a SSH tunnel.
The following will bind the tunnel to port 1234
on your local machine. This is the port you will use to connect your proxy.
ssh -D 1234 -N -vvv www.website.com
1234
can be any port, just be sure that any change to this port number is reflected Network Panel
open /System/Library/PreferencePanes/Network.prefPane
All of the remote server's ports should now be accessable as if they were local. For example, you can now access Solr via the following: