I'm using a VPN which use Bitmask to create the tunnel. I'd like to access my local network and hence added a route using ip route add
:
ip route add 172.16.0.0/16 via 172.16.46.1
I got the the gateway by using ip route show | grep default
which I found on another Stackexchange answer. However, this did not work. I specified the device as well but that didn't work either.
This is the output of ip route show
0.0.0.0/1 via 10.41.0.1 dev tun1
default via 172.16.46.1 dev enp3s0 proto dhcp metric 20100
10.41.0.0/21 dev tun1 proto kernel scope link src 10.41.0.89
10.41.0.0/21 dev tun0 proto kernel scope link src 10.41.0.37
37.218.241.7 via 172.16.46.1 dev enp3s0
128.0.0.0/1 via 10.41.0.1 dev tun1
169.254.0.0/16 dev enp3s0 scope link metric 1000
172.16.0.0/16 via 172.16.46.1 dev enp3s0
172.16.46.0/23 dev enp3s0 proto kernel scope link src 172.16.46.104 metric 100
198.252.153.28 via 172.16.46.1 dev enp3s0
212.83.143.67 via 172.16.46.1 dev enp3s0
My route does seem to get added to the routing table. However, I still cannot access website in my local network, nor can I ping them. Doing a similiar thing (route add 172.16.0.0 MASK 255.255.0.0 172.16.46.1
) on Windows works perfectly.
Does the order of the routes as outputted by ip route show
affect the final route chose? The default route (0.0.0.0) is through the tun1, an interface created by the VPN software. Will that route be chosen first? What am I doing wrong?
Thanks.