My PPTP VPN works fine on Windows and Android. On Android and Windows, no specific configuration is needed only I need to check PPP encryption(MPPE).
But on Ubuntu 20.04 it disconnects randomly after a period of time.
My PPTP VPN works fine on Windows and Android. On Android and Windows, no specific configuration is needed only I need to check PPP encryption(MPPE).
But on Ubuntu 20.04 it disconnects randomly after a period of time.
I found the answer here: Ubuntu 14 pptp client disconnects frequently.
I had to use on the client.
This could be investigated by reading syslog errors:
By setting
mtu
we are telling thewlan
to use smaller messages.I wonder why users of other operating systems don't have to configure their WLAN message size to use the simplest form of VPN.
update
To do it permanently
Find your device's interface name
wlan0...
byifconfig
.Create the file
/etc/network/if-up.d/ppp
with the following content:Use
chmod +x /etc/network/if-up.d/ppp
to make it executable. It runs on every connect and disconnect.I use your answer, and answer it to solve the question about Set the MTU permanently:
I found this link (for permanent set the MTU)
We make a script in
/etc/network/if-up.d/
and call itset-pptp.sh
, this script will be called whenever a link is trying to get up.Now inside this file we insert these lines:
[We are checking the current interface that is trying to get up, if it's a VPN, we set its MTU to 1300 and if not we set its MTU to 1400]
Now we need to make it executable:
Last Step (Important):
If you are using a graphical network manager, those that are in KDE, Gnome, etc ..., you need to do this too:
Open this file:
/etc/NetworkManager/dispatcher.d/01-ifupdown
, in my computer, its name is 01-ifupdown, maybe in yours it has other names, open it.Find the line that has something like this:
Change it to this:
Done, you have a permanently MTU settings now.