When connecting via pptp
, the following route becomes the default route:
default dev ppp0 proto static scope link metric 50
Because the remote network is not set up to access the Internet, this prevents you from accessing the Internet.
It seems that you are connecting to the 172.17.1.0/24
subnet and I am unsure why there is an additional route created. Also, it seems problematic:
default via 192.168.0.156 dev ppp0
I would recommend deleting these two routes to see if Internet access is restored:
sudo ip route del default dev ppp0
sudo ip route del default via 192.168.0.156 dev ppp0
When I set up VPN, I prefer to prevent automated route changes, and set them up myself.
# Turn on pptp/VPN
pon VPN_SERVICE
# Determine pptp subnet gateway
export vpngateway=$(ip -4 addr show ppp0 | grep -oP '(?<=peer\s)\d+(\.\d+){3}')
ip route 172.17.1.0/24 via $vpngateway
This would result in something such as:
default via 192.168.0.1 dev wlp3s0 proto dhcp metric 600
169.254.0.0/16 dev wlp3s0 scope link metric 1000
172.17.1.0/24 via SOME_IP_HERE dev ppp0
185.195.25.217 via 192.168.0.1 dev wlp3s0 src 192.168.0.156
192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.156 metric 600
However, it seems like it's possible that your home network (192.168.0.0/24) is conflicting with the remote network, and has a gateway in the same space (192.168.0.156).
For example, when connected via pptp
, if...
ip -4 addr show ppp0 | grep -oP '(?<=peer\s)\d+(\.\d+){3}'
... shows 192.168.0.156
, you have this problem.
You could change either your LAN subnet, or remote subnet, to something like 192.168.1.0/24, 192.168.69.0/24, etc.
Summary
- Internet traffic will go through your default route. The remote network needs to support access to the Internet, or you need to preserve your original default route (ie: via LAN).
- LAN and remote network subnets must not conflict.