Connecting to a PPTP VPN from an OpenVZ VPS

PPTP allows you to implement your own VPN. PPTP (A Point-To-Point Tunneling Protocol ) is less secure than OpenVPN.

To enable PPP in the vps, first you need to enable PPP modules in the host node.

Login to the host node

modprobe ppp_mppe
modprobe ppp_deflate
modprobe zlib_deflate
modprobe ppp_async
modprobe ppp_generic
modprobe slhc
modprobe crc_ccitt
Now you can see the below result, if you run
lsmod | grep ppp
ppp_mppe                6182  0
ppp_deflate             4176  0
zlib_deflate           21629  1 ppp_deflate
ppp_async               7866  0
crc_ccitt               1725  1 ppp_async
ppp_generic            25763  3 ppp_mppe,ppp_deflate,ppp_async
slhc                    5813  1 ppp_generic
Second, you have to tweak the VPS’s conf file:
vzctl stop [VEnumber]
vzctl set [VEnumber] --features ppp:on --save
vzctl start [VEnumber]
vzctl set [VEnumber] --devices c:108:0:rw --save
vzctl exec [VEnumber] mknod /dev/ppp c 108 0
vzctl exec [VEnumber] chmod 600 /dev/ppp

After that, you might need to uncomment the require-mppe-128 or mppe required,stateless line in /etc/ppp/options.pptp (depending on the VPN server). You may also need to manually create a static route to the network, with route add -net 10.1.1.0 netmask 255.255.255.0 ppp0.

You can check /var/log/messages for details about negotiation errors.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s