Easiest Way To Build VPN Server with PPTP
|How to Install PPTP VPN on CentOS server in ONLY 3 steps – In this page I will show you a shortcut method how to build a VPN server based on PPTP technology in only 3 (three) steps. Normally if you want to install it manually you’ll need at least 10 steps to make it done correctly and setting up PPTPD options to match with your server. Thanks to an installer script that does everything in 3 simple Unix commands.
What you need?
- A VPS or Dedicated server running CentOS 6.x
- Proper knowledge to use Putty, SSH and common Unix command
- Only for VPS based-on OpenVZ virtualization (other skip this): please enable TUN/TAP and PPP options in your VPS control panel (e.g: SolusVM).
OpenVZ VPS user only:
How To Install PPTP VPN on CentOS 6.x
Step 0 – Login to your server via SSH. You better login as root.
Step 1 – Now issue this first command syntax:
yum install -y git
example:
Step 2 – Now also type this command and hit Enter
cd /opt && git clone git://github.com/drewsymo/VPN.git
example:
Step 3 – The final command, issue this and wait (the output a little bit long):
cd VPN && bash vpn-setup-vanilla.sh
example:
That’s it. Now your brand new VPN server is ready to use. You’ll see default username and password at the end of the installation:
Now you can test it on your iPhone,iPad and Android devices.
NOTE for OpenVZ-based VPS:
You have to also issue this last command:
iptables -t nat -A POSTROUTING -j SNAT --to-source x.x.x.x
Please replace x.x.x.x with your venet0 IP address.
Conclusion
Building a VPN server using CentOS can never be easier than above method. I tested this script in a Cloud server hosted by DigitalOcean which I don’t know what virtualization technology used but it works like charm. For you guys who simply need a free PPTP VPN server that really works (and fast) to use in your iPhone, iPad, iPod or any Android devices, you can visit VPNADAY.COM. There you can get free VPN with no registration.
Credit of the script goes to drewsymo.com.
Here is the tutorials of pptp vpn server http://www.purevpn.com/tutorials.php
Hey Sawiyati,
Thanks for using my PPTP VPN installer for CentOS. It’d be great if you could also put a link to my original post just for a little credit 🙂
http://drewsymo.com/networking/vpn/install-pptp-vpn-centos/
Thanks!
Added. Thanks 🙂 your script is awesome
how many client can use this vpn pptp with same all username & password
or have config for make more user use this vps ?
Thx you
Hi there, with what command can I test if the vpn is online?
Also we have to confirm our device run the ifconfig command. and see if it’s eth0 or venet0 I was stuck in this for a few days and at last fount it. If your device is eth0 then you don’t have to change anything from the bash script but if it’s venet0 then change eth0 to venet0 in vpn-setup-vanilla.sh
how i do change exiting user pass and add new user ?
You can change the username and password by editing /etc/ppp/chap-secrets
Every time I used this command, I received this connection error:
cd /opt && git clone git://github.com/drewsymo/VPN.git
github.com[0: 192.30.252.130]: errno=connection timed out
fatal: unable to connect a socket (connection timed out)
I installed it. it can connects only when I stop iptable service. but even after that can’t open any page except the websites that are hosted on my server. I mean it’s localhost. how can I fix it?
thanks
Good to have such a script!
I am trying to setup such small pptp Server since three days now.
It was clear to me that everything with LINUX takes 50x more time, effort and nerves than with a Windows server.
I still got error 619 when connecting from a Windows Client (7 and 8).
Like tenthousands of others.
Even with this script on a CentOS 6.5 VPS (bluehost).
Any hope that this can be resolved within another 30 hours?
Hi, all,
my situation as this one @Tom, could anyone fix it ?
Hello linyu,
still the same error (619) and no solution for it.
I spent lots of time to resolve this and went through many websites discussing this problem.
Great stuff in your website about vpn. please guide me how to allow only one specific external static ip to connect vpn server. please please guide me.
my VPN is not working anymore 🙁 it worked fine for say few days now it won’t connect i tried to restart pptpd but same can you help me in this?
try reinstalling it, or make sure it’s not blocked by your provider 🙂
i am sure it’s not blocked okay ill try re-installing it 🙂
i have tried re-installing it but it’s same 🙁
How much RAM a PPTP VPN server will take?
Ok, so now everything is installed and it says you can now connect to your vpn via your external ip. Now what? Do i have to make a vpn server first? how do i actually connect to the vpn so my ip is changed?
Please someone get back to me as soon as possible 🙂
Hello,
Connecting to a pptp VPN Server is different for each OS, for example, if you are using Windows 7 or 8, Go to your networks and Sharing Center, Setup a new connection, and select the VPN Option, The Hostname would be your External IP you have here.
Thanks, Jacob
Chair Hosting
thanks for additional information 🙂
Can we connect our pc with this vpn.If yes then how and can i install this while having sites hosted on my vps.
Just wanted to say thank you. I was going nuts following all the pptp tutorials out there and no one ever mentioned the firewall rule for vnet, that solved my issue where I could connect but not gain internet access.
can this method work on centos 7 to install PPTP VPN???
http://irbil.ru/vds.html
Russian vps – 3.5$!!!
Hello, Sawiyati.
Very impressive effort.
I have followed your instructions.
I can connect using my Mac OSX PPTP VPN Network client.
However, once connected, I am unable to “surf” the internet via Chrome.
Do you have any suggestions?
Thank you much!
Shea
PPP Link Control Was Terminated?
How to fix it? thank you
Does this method still work?
Added. Thanks ? your script for very helpful for me