Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to setup PPTP VPN ON OPENVZ VPS ( tested with ubuntu 11.04 with 32 mb IPXCORE vps )
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to setup PPTP VPN ON OPENVZ VPS ( tested with ubuntu 11.04 with 32 mb IPXCORE vps )

ResearcherResearcher Member
edited December 2012 in Tutorials

Hey

I have already confirmed that ipxcore have enable by default both of these required modules

Required kernel support:
ppp
MPPE

mknod /dev/ppp c 108 0

apt-get update

apt-get install pptpd

vim /etc/ppp/pptpd-options

add


ms-dns 8.8.8.8

ms-dns 8.8.4.4

cp -R /etc/ppp/pptpd-options /etc/pptpd.conf

vim /etc/pptpd.conf

add


localip ipv4-ip-of-your-vps

remoteip 10.0.0.10-100

vim /etc/ppp/chap-secrets

add


johndoe * johndoepassword *

note : use tab key to create space in above line

#/etc/init.d/pptpd restart

Now, if you would like to add internet access over this vpn, you can do this:

#vim /etc/sysctl.conf

and find the line for ipv4 forwarding and make sure it = 1:


net.ipv4.ip_forward = 1

Then use iptables to get the net forwarded:

#/sbin/iptables -P FORWARD ACCEPT

#/sbin/iptables --table nat -A POSTROUTING -o venet0 -j MASQUERADE

If this gives an error like “iptables: No chain/target/match by that name”, check if iptable_nat is enabled:


#modprobe iptable_nat

If not, then either enable it and try again or use this instead:


#iptables -t nat -A POSTROUTING -o venet0 -s 10.0.0.1/24 -j SNAT --to x.x.x.x

Where x.x.x.x is your server’s outgoing IP.

And then restart again`

Comments

Sign In or Register to comment.