Assuming a device with no firewall restrictions. Is it possible to have a VPN connection in parallel with an SSH connection on the same adapter? Is it possible without having the SSH connection going through the VPN connection?

I was able to setup iptables routing so internet goes through ethernet and VPN except for local subnet goes through wifi.

Is there an iptables rule to route 127.xx.xxx.22 directly to and send all other ethernet traffic through VPN?

1 Answer 1


Yes, linux network manager will let you specify an IP address or IP range which will be routed directly to the gateway IP instead of the VPN.

I am still curious about how to do it with iproute. It must be possible because the network manager could do it. Maybe with iproute no matter what adapter is used the specific ip will route to gateway? That could be useful.

  • It's a matter of routing priorities and netmasks. Also, I've seen VPNs that fight this and will delete routes you try to add.
    – user10489
    Aug 1 at 11:16

Your Answer

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