Setup a PPTP VPN in OpenVZ
Written by Admin Thursday, 10 January 2013 13:52
Only the steps are mentioned below.
1. Make sure devel package of the OpenVZ kernel is installed in HN.
Â
2. Make sure TUN/TAP is enabled for the VE and PPTP VPN is installed and running.
Â
3. Load all the PPP modules in HN
Â
HN#
Â
modprobe tun
modprobe ppp-compress-18
modprobe ppp_mppe
modprobe ppp_deflate
modprobe ppp_async
modprobe pppoatm
modprobe ppp_generic
Â
4. Stop the VE
Â
# vzctl stop {VEID}
5. From HN, run the below commands:
Â
HN#
# vzctl set {VEID} --features ppp:on --save
# vzctl start {VEID}
# vzctl set {VEID} --devices c:108:0:rw --save
# vzctl exec {VEID} mknod /dev/ppp c 108 0
# vzctl exec {VEID} chmod 600 /dev/ppp
Â
6. Login to VE and see if the 'pppd' command works.
Â
VE#
# /usr/sbin/pppd
If you see some garbage values, it means it is enabled correctly.