How to force all packet go through tun0 ?
Hello,
I have reconnect script which reconnect the vpn connection if tun0 is missing. Still during the reconnect phase, the packets go through the eth0. How can I force all packets to go through tun0 and how can I exclude the domain required for vpn connection to be established ?
Thanks
Quoted 7 lines · J. Bakshi
Hello,
I have reconnect script which reconnect the vpn connection if tun0 is missing. Still during the reconnect phase, the packets go through the eth0. How can I force all packets to go through tun0 and how can I exclude the domain required for vpn connection to be established ?
Just like VPN solutions themselves do when they establish a tunnel with a default route:
ip route add 134.76.22.1/32 dev eth0
ip route replace default via tun0