How To Add PPP Kernel Support To OpenVZ Containers

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:

modprobe tun
modprobe ppp-compress-18
modprobe ppp_mppe
modprobe ppp_deflate
modprobe ppp_async
modprobe pppoatm
modprobe ppp_generic

To make sure that these modules get loaded automatically when the system is booted, add them to /etc/modules:

vi /etc/modules



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.


Falko Timme

About Falko Timme

Falko Timme is an experienced Linux administrator and founder of Timme Hosting, a leading nginx business hosting company in Germany. He is one of the most active authors on 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".

Share this page:

Suggested articles

0 Comment(s)

Add comment