Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

VPN 

*Tutorial*: Setup Your own VPN

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:

Code
sudo apt-get install pptpd

Wait it to finish downloading & installing.
Then open the config file with the following command:

Code
sudo nano /etc/pptpd.conf

At the end of the file, at the local and remote IP:

Code
localip xx.xx.xx.x
remoteip xx.xx.xx.x

Replace 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.8

If the line above doesn't exist, simply add it.
Ok, let's create user accounts:

Code
sudo nano /etc/ppp/chap-secrets

In 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.conf

And remove the '#' in front of the following line:

Code
# net.ipv4.ip_forward=1

To refresh this, do the following command:

Code
sudo sysctl -p

Let's create the iptables rule, we're almost finished !

Code
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables-save

Ok, we're done, last command, we need to restart the PPTP service in order to 'refresh' previous inputed commands, do:

Code
sudo service pptpd restart

Here we're are, you can now connect to your VPN server !
Have fun !
I am going to try this, hopefully it works. If it does, I will set it up at my fathers office building which I have less than legally gained access to the servers. This is going to rock.
I'm getting a VPN soon and this will help me, Thanks
Happy to see you might find it any use !


Possibly Related Threads...
Thread / Author Replies Views Last Post
by hextra6May 4, 2025 07:55 PM 25 2,938 May 4, 2025 07:55 PM
Last Post: ginxforce
by secret1337Jan 17, 2024 07:17 AM 7 621 Jan 17, 2024 07:17 AM
Last Post: flossmymonkey
[VPN] by skywolfMay 18, 2019 04:52 AM 0 155 May 18, 2019 04:52 AM
Last Post: skywolf