# VPN connection while preserving SSH connection

**URL:** <https://forums.suse.com/t/vpn-connection-while-preserving-ssh-connection/24942>\
**Category:** SLES Networking\
**Created:** [January 2, 2014, 2:20pm UTC](https://forums.suse.com/t/vpn-connection-while-preserving-ssh-connection/24942 "2014-01-02T14:20:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristianunger](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kristianunger](https://forums.suse.com/u/kristianunger)\
**Post date:** [January 2, 2014, 2:20pm UTC](https://forums.suse.com/t/vpn-connection-while-preserving-ssh-connection/24942/1 "2014-01-02T14:20:08Z")

</div>

Hi there,

I have a SLES server hosted at the IT department of the company I am working for. I have another server located in London which I can reach via VPN (PPTP) from any desktop. I want to transfer quite an amount of data from the London server to my companies server. However, if I connect the companies server to the VPN of the London server I lose the SSH connection due to the IP change. Is there any way I can get the companies’ server connected to the London VPN while preserving the SSH connection?

Many thanks,

Kristian

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [January 2, 2014, 5:44pm UTC](https://forums.suse.com/t/vpn-connection-while-preserving-ssh-connection/24942/2 "2014-01-02T17:44:45Z")

</div>

This depends entirely on your VPN setup. Some VPN administrator require  
that any clients connecting then route all possible traffic through the  
VPN. It’s not usually so much that the client’s IP address changes as  
much as it is the client machine is no longer allowed to be reached via  
that IP address per routing rules. For the record, I hate these types of  
systems because of this kind of pain/suffering.

There are other options I suppose, like once the first SSH connection dies  
instead making a connecting via the IP address associated with that client  
machine from the VPN setup itself (assuming that can be accessed).  
Another option that I’ve used before is explicitly overriding the lousy  
VPN client settings and adding the ability to talk normally to systems or  
networks by adding routing rules. This can be easy (one command one time)  
or harder (one command in a loop over and over) depending on how  
persistent the VPN client is with detecting these kinds of unauthorized  
changes. Using the ‘ip route’ command to add the route back to your local  
network is usually a breeze, though.

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…
