ubuntu PPTP route


I assume “net.ipv4.ip_forward” is commented in the /etc/sysctl.conf file:

nano /etc/sysctl.conf

Add or find and comment out the following line


Save, close the file and run the following command to make the changes take effect.

sysctl -p

The following iptables firewall rules allow port 1723, GRE and perform NAT

iptables -I INPUT -p tcp --dport 1723 -m state --state NEW -j ACCEPT
iptables -I INPUT -p gre -j ACCEPT
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

In the last rule replace “eth0″ with the interface connecting to the internet on your VPN server. Finally the following rule is required to ensure websites load properly

iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -s -j TCPMSS --clamp-mss-to-pmtu

Replace with the IP address range used in the “remoteip” option in the /etc/pptpd.conf this firewall rule is used to ensure a proper MTU value is used to prevent fragmentation.


Open the Terminal and type in:


You will be asked for your root password, please type it in and press enter

rm -r /etc/resolv.conf
nano /etc/resolv.conf

When the text editor opens, please type in these lines:


Now you have to close and save the file, you can do that by clicking Ctrl + X and pressing Y. Then please continue typing in the terminal:

chattr +i /etc/resolv.conf
reboot now

That is it. Your computer will reboot and everything should work correctly. If you will ever need to change your DNS addresses, please open the terminal and type in the following:


You will be asked for your root password, please type it in and press enter

chattr -i /etc/resolv.conf
nano /etc/resolv.conf

Change DNS addresses, save and close the file.

when DNS is not working and warning like
$ nordvpn c jp
Connecting to Japan #111 (jp111.nordvpn.com)
We're having trouble configuring Your DNS settings. If the issue persists, please contact our customer support.

reflesh resolver ( rm and nano )

$nordvpn set dns