Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 at 8:58
@TarekJellali - I am on Windows 8. That guide is for Windows 2000/XP. – Pranav Jituri Mar 24 '14 at 9:31
Those commands are made using cmd, you can try them I think they work. – Tarek Jellali Mar 24 '14 at 9:59

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 '14 at 16:17
On which aspect? – Richard E. Silverman Mar 27 '14 at 15:28
Like the steps to follow or the commands to execute? – Pranav Jituri Mar 27 '14 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 '14 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 and your default gateway is, "route add". 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 '14 at 1:51

Your Answer


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.