In this tutorial, we'll do a PPTP VPN Server.
To begin, login into a Linux server.
I am using Ubuntu 12.04.
Open a terminal and input:
Wait it to finish downloading & installing.
Then open the config file with the following command:
At the end of the file, at the local and remote IP:
Replace the 'x' for the values of the IPs.
Now, we'll change the DNS, we'll put Google's.
If the line above doesn't exist, simply add it.
Ok, let's create user accounts:
In there, put the following line:
user: It's your username, replace it with your own value.
pptpd: The service, leave it as it is.
pass123: The password the user will have to input to be able to connect.
*: Means ANY IP can connect, if you want to allow only one, replace it with your IP.
Let's do the forwading to be able to connect:
And remove the '#' in front of the following line:
To refresh this, do the following command:
Let's create the iptables rule, we're almost finished !
Ok, we're done, last command, we need to restart the PPTP service in order to 'refresh' previous inputed commands, do:
Here we're are, you can now connect to your VPN server !
Have fun !
To begin, login into a Linux server.
I am using Ubuntu 12.04.
Open a terminal and input:
Code
sudo apt-get install pptpdWait it to finish downloading & installing.
Then open the config file with the following command:
Code
sudo nano /etc/pptpd.confAt the end of the file, at the local and remote IP:
Code
localip xx.xx.xx.x
remoteip xx.xx.xx.xReplace the 'x' for the values of the IPs.
Now, we'll change the DNS, we'll put Google's.
Code
ms-dns 8.8.8.8If the line above doesn't exist, simply add it.
Ok, let's create user accounts:
Code
sudo nano /etc/ppp/chap-secretsIn there, put the following line:
Code
user pptpd pass123 *user: It's your username, replace it with your own value.
pptpd: The service, leave it as it is.
pass123: The password the user will have to input to be able to connect.
*: Means ANY IP can connect, if you want to allow only one, replace it with your IP.
Let's do the forwading to be able to connect:
Code
sudo nano /etc/sysctl.confAnd remove the '#' in front of the following line:
Code
# net.ipv4.ip_forward=1To refresh this, do the following command:
Code
sudo sysctl -pLet's create the iptables rule, we're almost finished !
Code
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables-saveOk, we're done, last command, we need to restart the PPTP service in order to 'refresh' previous inputed commands, do:
Code
sudo service pptpd restartHere we're are, you can now connect to your VPN server !
Have fun !

