Score:1

When connecting pptp, the Internet disappears

us flag

My internet is connected via wi-fi. OS Ubuntu 20.04

I set up a pptp connection. Connected to him. But my internet is down.

In the pptp settings it is written that you need to disable Internet access for the pptp connection.

But in the settings in ubuntu there is no such checkbox.

How can I specify that the Internet would not be used through this connection?

ip route
Working

default via 192.168.0.1 dev wlp3s0 proto dhcp metric 600 
169.254.0.0/16 dev wlp3s0 scope link metric 1000 
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 

Not Working

default dev ppp0 proto static scope link metric 50 
default via 192.168.0.156 dev ppp0 proto static metric 50 
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 192.168.0.156 dev ppp0 proto static metric 50 
185.195.25.217 via 192.168.0.1 dev wlp3s0 src 192.168.0.156 
185.195.25.217 dev ppp0 proto kernel scope link src 172.17.1.14 metric 50 
185.195.25.217 via 192.168.0.1 dev wlp3s0 proto static metric 600 
192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.156 metric 600 
192.168.0.1 dev wlp3s0 proto static scope link metric 600 

sudo ip route del default dev ppp0

default via 192.168.0.156 dev ppp0 proto static metric 50 
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 192.168.0.156 dev ppp0 proto static metric 50 
185.195.25.217 via 192.168.0.1 dev wlp3s0 src 192.168.0.156 
185.195.25.217 dev ppp0 proto kernel scope link src 172.17.1.14 metric 50 
185.195.25.217 via 192.168.0.1 dev wlp3s0 proto static metric 600 
192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.156 metric 600 
192.168.0.1 dev wlp3s0 proto static scope link metric 600 

In documentation

This happened because our IP address blocked access to the Internet (more). 
In the PPTP client settings, find and disable items like:

Use to access the Internet
Use default gateway
Use default gateway on remote network
it flag
Can you post the output of `ip route`? One while your Internet works (not connected to pptp) and one while your Internet is broken (connected to pptp). My bet is your routes change or you have conflicting subnets.
Sergey avatar
us flag
Added to the question.
it flag
I'd give `sudo ip route del default dev ppp0` a shot, while connected, and see if you can access the Internet again.
Sergey avatar
us flag
did not help. Internet did not appear. Added to question.
Sergey avatar
us flag
Added text what i see in documentation
Score:1
it flag

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

  1. 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).
  2. LAN and remote network subnets must not conflict.
Sergey avatar
us flag
Thanks ut is working/ One more question/ Where can I write these parameters so that the connection does not contain these parameters?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.