

Under 'Destination' select the 'Dynamic' radio button and leave the 'Auto' button selected.ĥ. For 'Source Port' enter '31415' (this can be configured to whatever you want, just remember it).Ĥ. On the left side, in the Category window, go to Connection -> SSH -> Tunnels.ģ. Login to a linux machine and type "home" and this will display your homesite.Ģ. The hostname should be your UCLA homesite followed by ".". Things you'll need: A Linux Mathnet account, PuTTY (ssh client), and Firefox.ġ.
SETUP SSH TUNNEL IN PUTTY WINDOWS
This example shows a connection from a Windows machine using Firefox. A proxy setup can be configured using OSX, Linux, or Windows using various browsers. If you are browsing this site from off-campus, and you have a Mathnet Linux account, you can use this proxy setup to make it appear that your traffic comes from one of our IP addresses.
SETUP SSH TUNNEL IN PUTTY FULL
In particular, connections to must come from a registered UCLA Math IP address to gain full access.
SETUP SSH TUNNEL IN PUTTY MANUAL
(Don't worry about the difference I have to look it up in the manual every single time I need it.Some websites available to Math Department members are filtered by the network the traffic originates on. The -L says that programs will attempt to connect Locally, and the -R says that programs will attempt to connect Remotely. It took me years to get the hang of the difference between -L and -R connection forwarding. Programs on your server (or elsewhere on the server's network) must be able to connect to server:6000 (or server's routable address, port 6000) to initiate the connection. With this command, a program on the laptop must be listening to port 7000 for connections. If you wanted it to be open to all machines that can contact the server, then you could use ssh -R *:6000:localhost:7000. By default this is only open to connections initiated on the server machine. If you want connections made to server:6000 to be forwarded to laptop:7000, then you could use ssh -R 6000:localhost:7000. Programs on your laptop (or elsewhere on your local network) must be able to connect to your localhost:7000 (or your machine's non-routable address, port 7000) to initiate the connection. With this command, a program on the server must be listening to port 6000 for connections. This restricts the port on your laptop to connections initiated on the laptop itself. If the connections originate on your laptop then you could slightly amend this to: ssh -L localhost:7000:server:6000. If you want connections made to laptop:7000 to be forwarded to server:6000, then you could use ssh -L 7000:server:6000. Since I don't know putty, I'll give the corresponding commands from OpenSSH hopefully it'll be easy to find the corresponding options in the GUI config boxes of putty. The connection will always be initiated from your laptop (because it cannot be directly addressed from the other machine) but you will use one or the other connection forwarding arguments based on how you want the port forwarding to work.

The direction of your arrows has no relationship to which machine has publicly routable IP addresses - you need to know which direction you want your arrow to go based on the problem you're trying to solve.
