You are not logged in.

#1 2023-01-07 13:23:34

Tbone-dualU
Member
Registered: 2023-01-07
Posts: 1

[SOLVED] Simple ip route to exclude local ip from VPN

Hi,

IDK if this should be in the newbie section, if so I apologize.

I have a local server that connects to a local router. The router is configured with VPN so that all internet traffic is through the VPN. Sometimes I "double hop" with the local server, i.e. the local server connects to a second VPN with traffic still going through the local router. This is done by running hummingbird from airvpn on the local server.

When the local server is running hummingbird, kdeconnect from other local computers doesn't work.

So I wan't to add an ip route, so that some local ip's are excluded from the VPN hummingbird has started.

IP route on local server when hummingbird is running:

0.0.0.0/1 via 10.27.120.1 dev tun0 
default via 192.168.1.1 dev enp7s0 proto dhcp src 192.168.1.101 metric 1002 
10.27.120.0/24 dev tun0 proto kernel scope link src 10.27.120.82 
37.120.155.178 via 192.168.1.1 dev enp7s0 
128.0.0.0/1 via 10.27.120.1 dev tun0 
192.168.1.0/24 dev enp7s0 proto dhcp scope link src 192.168.1.101 metric 1002

192.168.1.1 is the router.
192.168.1.101 is the local server.
I think 37.127.155.178 is the VPN started by hummingbird.

I'm thinking this is fairly simple, but don't know much about networking.

I have tried the following without success:

ip route add 192.168.1.80 via 192.168.1.101 dev enp7s0

192.168.1.80 is a local client.

Thank you in advance

EDIT:

Also without it working (tried separately):

ip route add 192.168.1.80 via 192.168.1.1
ip route add 192.168.1.80/32 dev enp7s0

SOLUTION:

It is not a solution to adding an ip route to exclude local ip from VPN, but is a solution to the core of my problem.

Getting kdeconnect to work, when local server is running a VPN.

Edit config:

~/.config/kdeconnect/config

On the local server, add the ip of clients:

name=localserver
customDevices=192.168.1.80,192.168.1.81

On the clients, add the ip of the local server:

name=clientpc
customDevices=192.168.1.101

If on android, in kdeconnect do Settings -> Add devices by IP -> Add ip of local server

Last edited by Tbone-dualU (2023-01-08 10:20:29)

Offline

Board footer

Powered by FluxBB