How To Add PPP Kernel Support To OpenVZ Containers
Author: Falko Timme
Follow me on Twitter
If you are trying to build a VPN tunnel from within an OpenVZ container to some other system, you will most likely get the error message /usr/sbin/pppd: Sorry - this system lacks PPP kernel support. This tutorial explains how you can add PPP kernel support to your OpenVZ container so that you can start VPN connections from your container.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
It is necessary to have root access to the host system. If you don't have access to the host system, you must ask your hoster to help you.
2 Enabling PPP Kernel Modules On The Host
The following commands have to be run on the host system!
Before we can use PPP in the container, we must enable the PPP kernel modules on the host system:
To make sure that these modules get loaded automatically when the system is booted, add them to /etc/modules:
[...] tun ppp-compress-18 ppp_mppe ppp_deflate ppp_async pppoatm ppp_generic [...]
3 Enabling PPP For The Container
The following commands have to be run on the host system again, not in the container!
In this example, my OpenVZ container id is 101. If yours is different, replace it appropriately.
In order to enable PPP, the container has to be restarted. These are the necessary commands:
vzctl stop 101
vzctl set 101 --features ppp:on --save
vzctl start 101
vzctl set 101 --devices c:108:0:rw --save
vzctl exec 101 mknod /dev/ppp c 108 0
vzctl exec 101 chmod 600 /dev/ppp
That's it! Now if you run /usr/sbin/pppd in the container, the error message /usr/sbin/pppd: Sorry - this system lacks PPP kernel support should not appear anymore.
- OpenVZ: http://openvz.org/
About The Author
Falko Timme is the owner of Timme Hosting (ultra-fast nginx hosting with SSDs and Google Pagespeed). He is the lead maintainer of HowtoForge (since 2005) and one of the core developers of ISPConfig (since 2000). He has also contributed to the O'Reilly book "Linux System Administration".