Tanbir Ahmed Official

How to build your own Linux PPTP VPN server, the easiest way

Some people suggest that maybe you should try to build your own vpn server yourself! Indeed it’s not rocket science but still it needs someone to show you the rope. I am not going to be very detailed in each step but you can research them separately.

First you have to get yourself a Xen VPS, not openVZ, although few openVZ provider supports PPTP VPN. I am using a openvz vps from buyvm.net. They do support pptpd, so i am all good to go. I am using linux CentOS in it.

Install PPTP server application on your VPS:


Type at the command line:

wget https://breakwall.net/promo/pptpd.sh

And press enter
Then type at the command line:

sh pptpd.sh

to run the script.

PPTP server application will be installed on your VPS. At the end of the installation, the script will create an VPN account for you (a username and a password).

That’s it. You now get your own VPN account on your own server! Now you can use the username and password and the IP of your server to log on. Of course you will need to do a simple set up on your Windows or iPad or Android phone like with a VPN account you get from a VPN service provider.

Create more VPN accounts for your friends!

You want to impress your friends by creating a VPN account on your server for them too!

It’s easy to add VPN accounts. Just edit a file “/etc/ppp/chap-secrets” on your folder. Wait.. how do you do that? You easiest way for people who are unfamiliar with linux is perhaps using FTP!

1. Download and install FileZilla (FTP client software).
2. Click “site manager” (the first button on the tool bar) and click add site
For Host field: type your server IP.
For Protocol: choose SFTP
For Login type: choose General
Then input your SSH account (not your VPN account!,the one that you VPS provider gives you) . The user name is usually “root”.
3. Click “Connect” and then you open your sever.
Go to /etc/ppp/ and then download the file “chap-secrets”. Edit that file with notepad and add a line:

newaccountname pptpd password *

4. Save the file and upload to the server to replace the old file.

Last but not least, you need to use you SSH account to log on your server command line using Putty again (like in step two) and then type:

service pptpd restart

For your new account to take effect.

Author: Tanbir A.

Tanbir is an engineer by profession, technologist, hobbyist photographer, graphics & web designer with avg knowledge in coding, SEO specialist, and blogger at TechWacky. His favorite topics to write about are tech, hacks, tutorials, arts & design and food. You can also find him on Twitter and Facebook!