My local network is and I can ssh properly to the host But after activating VPN (using vpnc) I can't ssh into above host anymore, because network now points to the remote one (the one i VPNed into).

Is there any way to add exception (change in routing table maybe?) for IP so it always points to the host in local network (not remote one) so I can ssh into it even while being connected to VPN?

Thank you.

My os: Manjaro 18.1.5 / soon to be 19
Interfaces after activating VPN:

  • enp5s0: inet brd scope global dynamic noprefixroute enp5s0
  • tun0: inet scope global tun0

ip r result:

default via dev enp5s0 proto dhcp metric 100 dev tun0 scope link
<IP1> via dev enp5s0 src dev tun0 scope link dev enp5s0 proto kernel scope link src metric 100 dev tun0 scope link dev tun0 scope link dev tun0 scope link dev tun0 scope link

-- EDIT -- It works now, but I have no idea why. Since it works I can't verify the answers below. When the problem happens again I will try the solutions, thank you.


Looks like a routing issue and IP range overlap. This line strikes me as odd: dev tun0 scope link

The scope is too large (/16) and overlaps with that interface enp5s0 is using. Usually a 192.168.* range is /24.

Is this your VPN pushing pushing a bad route maybe ? From this line: dev tun0 scope link

I gather that your VPN set up is on the 172.16. range and should not interfere with your local 192.168. range. Have a look at the VPN configuration.

  • The /16 would be normal if OP's remote VPN net consists of a bunch different 192.168.x subnets. – user1686 Feb 28 '20 at 13:23

The problem here is the metric 100 so you have two options

  1. You can remove the metric from the local network or add another metric to the remote one like 101 dev enp5s0 proto kernel scope link src metric 100 <-

  1. You should remove this one or add another metric to the next one as metric 101 dev tun0 scope link metric 101 <-

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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