![]() ![]() This can easily be overcome by having the client (in my case, the VPS) "ping" the server (in my case, the NAS) using the keep alive option. However, I suffered from the SSH tunnel being "closed" due to inactivity (depsite the ssh process staying up). So to reach my NAS from the internet, I simply need to create an SSH tunnel between my NAS and my VPS, that reliably stays open all the time (for round the clock access). Therefore, to reach my NAS, I have a VPS (which I rent from OVH for a very small monthly cost), and that has a fixed public IP address. I have a NAS that I want to reach from the internet, I can't use port forwarding because my ISP uses CGNAT (my public IP is not really my public IP, I'm behind another router I don't have any control over). Upstart script on Ubuntu, where /etc/inittab is not available: start on net-device-up IFACE=eth0Įxec ssh -i /path/to/rsaKey -N -o "ServerAliveInterval 180" -R 55002:localhost:22 scriptįor those who don't want to (or) can't use AutoSSH. etc/inittab, to have access to a box shipped and installed in another country, behind NAT, without port forwarding to the box, you can configure it to create an ssh tunnel back to you: tun1:2345:respawn:/usr/bin/ssh -i /path/to/rsaKey -f -N -o "ServerAliveInterval 180" -R 55002:localhost:22 'sleep 365d' sleep 5 done) do not remove the sleep command, ssh may fail quickly and you'll respawn too many processes Also, if you are trying to gain access to MathSciNet, go to and look for "Univ of Calif, Los Angeles" in the top right of the page.Always use ServerAliveInterval SSH option in case the tunnel issues are generated by expired NAT sessions.Īlways use a respawning method in case the connectivity goes down entirely, you have at least three options here: Go to and confirm that your IP address matches the host IP that you are tunneling through.Ģ. Make sure 'SOCKS v5' is selected and select the 'OK' button to save.Īs long as your PuTTY SSH connection remains connected, your proxy tunnel will be open and you will be able to use the internet through this proxy.ġ. In the 'SOCKS Host' box enter 'localhost' and for 'Port' enter '31415' (or whatever you set your SSH Tunnel up with).ħ. Under 'Configure Proxies to Access the Internet' select the 'Manual proxy configuration' radio button.Ħ. Under Advanced, in the middle of the page, select Network -> Connection -> Settings.ĥ. On the left side of the window, select Advanced.Ĥ. Once the tunnel is established, you now need to set up a SOCKS proxy in your web browser.ģ. This should open and terminal window and you should be prompted to login. You should see 'D31415' in the 'Forwarded ports:' box.Ħ. 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.ġ. 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. In particular, connections to must come from a registered UCLA Math IP address to gain full access. Some websites available to Math Department members are filtered by the network the traffic originates on. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |