Answer the question
In order to leave comments, you need to log in
How to properly separate VPN and Internet network routes?
Hello.
Network routes without vpn look like this
[email protected]:/home/drno/musor/openconnect-master# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.254 0.0.0.0 UG 600 0 0 wlp2s0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
[email protected]:/home/drno/musor/openconnect-master# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 0.0.0.0 0.0.0.0 U 50 0 0 vpn0
default 192.168.1.254 0.0.0.0 UG 600 0 0 wlp2s0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
113.13.13.0 0.0.0.0 255.255.254.0 U 50 0 0 vpn0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
192.168.1.254 0.0.0.0 255.255.255.255 UH 600 0 0 wlp2s0
supervpn.my.ru 192.168.1.254 255.255.255.255 UGH 600 0 0 wlp2s0
Answer the question
In order to leave comments, you need to log in
for Linux
sudo ip route del default dev vpn0
sudo ip route add 11.0.0.0/8 dev vpn0
route add 10.0.0.0 MASK 255.0.0.0 172.18.18.1
route delete 0.0.0.0 mask 0.0.0.0 172.18.18.1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question