In this guide, we'll explore how you can create your own VPN server!
You don't need advanced technical knowledge, as the process is quite straightforward.
Find a VPS Provider. First you need to find a VPS where you will set up your VPN server.There are many affordable VPS
providers available online.
Choose the Server's Operating System Decide OS for your server. While installation steps are generally
similar across different operating systems, there may be slight variations with firewall configurations.
I set up my VPN server on an Ubuntu-based system. Ubuntu is a great choice for beginners due to its large documentation.
So now we create PPTP server by next commands:
Enter our server and update our system type:
apt-get update -y
apt-get upgrade
Upgrading successful now install PPTPD adapter:
apt-get install pptpd
installation process should be completed in several minutes.
We need to configure our server by accessing and modifying the necessary folders.
(nano > text editor to enter folders.)
Enter folder type:
nano /etc/ppp/pptpd-options and find:
#ms-dns 10.0.0.1
#ms-dns 10.0.0.1
remove grids, uncommenting them and changing them to Google DNS servers:
ms-dns 8.8.8.8
ms-dns 8.8.4.4
Now we don't make any changes in this folder so we exit by pressing ctrl+x then save by pressing y + enter.
Create local ip address pool enter
nano /etc/pptpd.conf scroll down and find:
#localip 192.168.0.1
#remoteip 192.168.0.2
remove grids and type:
localip 192.168.0.1
remoteip 192.168.0.100-200
Save and exit.
Add users to our server enter
nano /etc/ppp/chap-secrets
#client server secret IP address
user1 pptpd 12345 *
user2 pptpd 12345 *
You can add as many as you want.
Instead of IP address we'll use * this removes restrictions and allow connection from any ip address.
Save and exit
Allow IP address redirection, enter
nano /etc/sysctl.conf and find
net.ipv4.ip_forward = 1 remove grid save and exit. Afterward
update changes by typing
sysctl -p in the main menu.
This are basic settings applicable to all major operating systems (Ubuntu, Debian, CentOS)
Now configure firewall on Ubuntu main menu type:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Launch Server
service pptpd start
Check it workable
service pptpd status
Done! your server is set up and ready to connect with your device:)
Consider the OpenVPN protocol its even simplier in installation and easy too connect too.
I highly recommend using it instead of PPTP for better security.
Go to the OpenVPN website, find the "Get Access Server Package" section and obtain the download link suitable for your OS.
It look like:
Copy and past that link on your server press Enter.
Once installation is complete, slightly scroll up and find your server credentials
for administrator and user, that's it server is running now!
Next change login/password if you wish. Login to the server using this ip address,
download OpenVPN connect for Windows, IOS, Android and start using your secured VPN connection.
We finished, now with this you can create your own VPN Server.