Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm using a virtual Ubuntu Server (on Amazon EC2) and I want to connect to a PPTP VPN server to route outgoing traffic through this connection. To do this, I specify the following two options:


This works - but the moment the tunnel to route the traffic is established, my SSH connection to the server is broken and I can't reconnect. This makes sense, but is nevertheless a real problem. Any ideas for a workaround? How can I route outgoing traffic through the VPN connection and still be able to SSH into the machine?

share|improve this question

Traffic routes are determined by routing tables. The best way to preserve your SSH connection is to configure a static route that defines the non-VPN gateway as the way to reach wherever it is you're coming from. This prevents the server from trying to route your SSH traffic over the VPN, which you don't want.

share|improve this answer
Could you provide a command example of how to do this? – Martin Aug 29 '12 at 21:57
@GreatFire There is a good answer for this over on AskUbuntu. Once you know where your ssh connection is coming from, you can modify /etc/network/interfaces to set a static route. – sysadmin1138 Aug 29 '12 at 22:03

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.