0

I have installed Ubuntu 14.04 and it is fully updated. I have established the vpn connection to the host vpn server using Network Manager with PPTP.

However, when I check the "use this connection only for resources on its network" in the IPv4 routes setting I am unable to ping or resolve host names on the servers inside the host network and I have internet routes outside of the host network. When I leave the "use this connection only for resources on its network" unchecked then I am able to ping and resolve the host names but no internet routes outside of the host network.

Here is what the routes table looks like.

#VPN connected with "use this connection only for resources on its network" checked

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
host.ip         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
host.ip         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
192.168.100.180 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0


#VPN connected with "use this connection only for resources on its network" unchecked

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
host.ip         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
host.ip         192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
192.168.100.180 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0

Is there anything I can do to resolve this issue?

0

Problem is in adding a default gateway.

When use this connection only for resources on its network is checked your default gateway is 192.168.1.1. When use this connection only for resources on its network is unchecked your default gateway is 0.0.0.0

Also when you are connected to vpn resource witch is routed trough ppp0 interface is only one host 192.168.100.180

In first case you can manually add route to resource on vpn site

sudo ip route add xxx.xxx.xxx.xxx/yy dev ppp0

xxx.xxx.xxx.xxx - represent host/network

yy - represent network mask

example:

add route to host 192.168.100.181 trough ppp0

 sudo ip route add 192.168.100.181/32 dev ppp0

add route to network range 192.168.100.0 with mask 255.255.255.0 trough ppp0

 sudo ip route add 192.168.100.0/24 dev ppp0

This also can be done in Network Manager. On same places where is use this connection only for resources on its network you can add route.

In second scenario, when use this connection only for resources on its network is unchecked you add default route to eth0 interface. This will allow to access resources on internet

 sudo ip route add default via 192.168.1.1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.