Recently I had a problem with my vpn – I couldn’t connect to my vpn server because of network limitation. Despite 1194 port was blocked by academy network administrators, they do not block ssh port. So I used very simple ssh tunnel to run my vpn connection. Here is how I got this work.
All You need is ssh account on server where vpn ports are not blocked (or other ports that You want to use), and You can connect to it. In console You have to type:
ssh -f -L 3000:[destination_ip]:1194 root@[server_ip] -N
After issuing this command, You have 3000 port opened on localhost and can connect to it. This port will be tunneled to “destination_ip” and port via “server_ip”. If You need to change ports You will simply replace 3000 (localhost port to connect to), and 1194 as destination port on server that You want to connect to. Option “-f” requests ssh to go to foreground – so You can close terminal and tunnel will still run. Option “-L” specifies what port on local machine (client/localhost) will be redirected to “destination_ip”, and “-N” says that ssh will not execute any remote command.
That’s all for now…
Hope to write soon :)
Leave a Reply