ubuntu PPTP route

https://askubuntu.com/questions/492923/pptpd-vpn-no-internet-access-after-connecting


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

net.ipv4.ip_forward=1

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 172.20.1.0/24 -j TCPMSS --clamp-mss-to-pmtu

Replace 172.20.1.0/24 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.

NordVPN_DNS

Open the Terminal and type in:

su

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:

nameserver 103.86.96.100
nameserver 103.86.99.100

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:

su

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 )
nameserver 1.1.1.1
nameserver 1.0.0.1

or
$nordvpn set dns 103.86.96.100 103.86.99.100