Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to setup an openvpn connection over the SSH tunnel which is having SOCKS proxy, but as soon as I connect to the openvpn server after setting up the SOCKS proxy, the SSH tunnel breaks as OpenVPN redirects all traffic.

Is there any way that I can route my SSH client through my Wifi and use OPENVPN to route traffic through the SSH Tunnel but the SSH Client does not get affected by the connection to the OPENVPN server?

Platform - Windows 8.

share|improve this question
    
Check out this. –  Tarek Jellali Mar 24 at 8:58
    
@TarekJellali - I am on Windows 8. That guide is for Windows 2000/XP. –  Pranav Jituri Mar 24 at 9:31
    
Those commands are made using cmd, you can try them I think they work. –  Tarek Jellali Mar 24 at 9:59

1 Answer 1

Configure OpenVPN to install a /32 route to the SSH server’s network address through your local default gateway, which will override the default route over the VPN tunnel. OpenVPN has a number of options for installing routes directly and running scripts at various stages; find one that adds this route before the connection comes up and the default route is changed.

share|improve this answer
    
Could you please elaborate? –  Pranav Jituri Mar 26 at 16:17
    
On which aspect? –  Richard E. Silverman Mar 27 at 15:28
    
Like the steps to follow or the commands to execute? –  Pranav Jituri Mar 27 at 16:14
    
I suggest these steps: read the OpenVPN documentation to find out how to do what I recommended. If anything I wrote is unclear, ask for an explanation. If you have trouble once you’ve done some work on your own, ask a specific question. –  Richard E. Silverman Mar 28 at 3:52
    
You can try it out first by simply adding the route before starting OpenVPN, e.g. if your SSH server has IP address 1.2.3.4 and your default gateway is 192.168.1.1, "route add 1.2.3.4/32 192.168.1.1". Later, you may want to automate adding and removing this route via the OpenVPN features I mentioned, determining the SSH server address from its hostname. –  Richard E. Silverman Mar 30 at 1:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.