Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

defaultroute
replacedefaultroute

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

1 Answer 1

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

 
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.