Cannot reach internet through PPTP VPN

Posted June 9, 2014 17.9k views
I built a VPN Server. I can connect VPN server with my pc but after the connection i can't reach to internet. syslog: route -n:

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers
Newline not work as intended ... view source for proper format ... anyone can tell me what happened about post formatting? Seems like you didn't set the localip & remoteip at /etc/pptpd.conf properly.
You should choose within the private network ip ranges to avoid ip conflict. Check private network ip range at here: Enable IP forwarding at /etc/sysctl.conf (ubuntu) by uncomment/add the following line:
Then add the following iptable rules (change the private network ip accordingly):
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables -I INPUT -s -i ppp0 -j ACCEPT
iptables --append FORWARD --in-interface eth0 -j ACCEPT
Install iptables-persistent to persist the iptables rules:
sudo apt-get install iptables-persistent
If you already installed iptables-persistent just save it
sudo service iptables-persistent save
You may also the following article, in case I get it wrong ...
by Bulat Khamitov
A Point-To-Point Tunneling Protocol (PPTP) allows you to implement your own VPN very quickly, and is compatible with most mobile devices. Even though PPTP is less secure than OpenVPN, it is faster and uses less CPU resources.
  • Great answer! As for post formatting, the site is going through some changes right now. At the moment, you can use some limited html markup. We'll be moving over to markdown soon.
Solved, thanks for your help!