Cannot reach internet through PPTP VPN

June 9, 2014 13.4k 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:
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!
Have another answer? Share your knowledge.