pptp vpn on openvz

PaulBones

InterServer Staff
Staff member
NB! Must use it on a fresh install of Ubuntu server 14.04
if you have previous attempts of installing PPTPD already – reinstall your VPS
with Ubuntu 14.04 minimal 64 bit - you can reinstall OS at any time from your account.

Important!
Login to your account. On the top menu choose "Support" and click on
"Open A Support Ticket". Fill in the support ticket form:
"Link Product To Ticket" - choose your VPS from the menu.
"Describe Your Problem" - Type here: Please enable PPP/TUN
Submit the ticket.

Login to your VPS as root.
User: root
Password: the one that you chose for your VPS.
Windows - use putty: http://www.putty.org/
Linux - ctrl+alt+t to bring up the console and type: ssh ip_address_of_your_VPS -l root

Should see something like:
root@servername:~#

- Now lets begin:
apt-get update
- might ask if you want to install without verification: type Y and hit enter.

apt-get install nano
- install small editor called “nano”
- might ask if you want to install without verification: type Y and hit enter.
- when editing files with it use Ctrl+O to save, Ctrl+X to exit.


apt-get install pptpd
- might ask if you want to install without verification: type Y and hit enter.

nano /etc/ppp/pptpd-options
- Find these:
#ms-dns 10.0.0.1
#ms-dns 10.0.0.2

- And change to:
ms-dns 8.8.8.8
ms-dns 8.8.4.4

- don't forget to use Ctrl+O – save. Ctrl+X – exit from nano.

nano /etc/pptpd.conf
- Find these at the end of the file:
#localip 192.168.0.1
#remoteip 192.168.0.234-238,192.168.0.245

- Change to:
localip 192.168.0.1
remoteip 192.168.0.234-238,192.168.0.245

- Ctrl+O to save and Ctrl+X to exit nano.


nano /etc/ppp/chap-secrets
- Find these:
# client server secret IP addresses

- Replace with:
username pptpd userpassword *

- use tabs to separate words, change username and userpassword to your liking.
- You will be connecting to your vpn using those username and userpassword.
- Ctrl+O to save and Ctrl+X to exit nano.


service pptpd restart

nano /etc/sysctl.conf
- Find this:
#net.ipv4.ip_forward=1

- Change to:
net.ipv4.ip_forward=1

- Ctrl+O to save and Ctrl+X to exit nano.



sysctl -p


nano /etc/rc.local
- Paste the following
- Above the line
: exit0

iptables -P FORWARD ACCEPT
iptables --table nat -A POSTROUTING -o venet0 -j MASQUERADE

- Ctrl+O to save and Ctrl+X to exit nano.


Now you should be able to connect to your VPN using the following settings:
type: PPTP
Address: your.VPS.ip.address
Username: your_username
Password: your_user_password
 
Last edited:

ExTaCy1337

New Member
Hello thanks for that, I did exactly those steps, I connect to the VPN on my windows computer and I cannot access any pages.

It shows I am connected to the VPN. But I have no connection.
What can I do?
 

PaulBones

InterServer Staff
Staff member
Hello,

Have you asked to enable PPP on your VPS? If not, please do:

Login to your account. On the top menu choose "Support" and click on
"Open A Support Ticket". Fill in the support ticket form:
"Link Product To Ticket" - choose your VPS from the menu.
"Describe Your Problem" - Type here: Please enable PPP/TUN
Submit the ticket.


Also make sure you have put this correctly, ABOVE the exit0

nano /etc/rc.local
- Paste the following
- Above the line
: exit0

iptables -P FORWARD ACCEPT
iptables --table nat -A POSTROUTING -o venet0 -j MASQUERADE
 

ExTaCy1337

New Member
Yes mate I had it enabled using support ticket.
I've also done that edit on rc.local

I installed OPENVPN-AS seems to work great :)
 
Top