By turgelfatih
I built a VPN Server. I can connect VPN server with my pc but after the connection i can’t reach to internet. syslog: http://sudrap.org/paste/text/335723/ route -n: http://sudrap.org/paste/text/335724/
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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. <pre> localip 192.168.122.1 remoteip 192.168.122.100-200 </pre> You should choose within the private network ip ranges to avoid ip conflict. Check private network ip range at here: http://en.wikipedia.org/wiki/Private_network
Enable IP forwarding at /etc/sysctl.conf (ubuntu) by uncomment/add the following line: <pre> net.ipv4.ip_forward=1 </pre> Then add the following iptable rules (change the private network ip accordingly): <pre> iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE iptables -I INPUT -s 192.168.122.0/24 -i ppp0 -j ACCEPT iptables --append FORWARD --in-interface eth0 -j ACCEPT </pre> Install iptables-persistent to persist the iptables rules: <pre> sudo apt-get install iptables-persistent </pre> If you already installed iptables-persistent just save it <pre> sudo service iptables-persistent save </pre> You may also the following article, in case I get it wrong … https://www.digitalocean.com/community/tutorials/how-to-setup-your-own-vpn-with-pptp
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.