How To Add PPP Kernel Support To OpenVZ Containers

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Wed, 2014-03-19 13:43. :: Debian | Linux | OpenVZ | Virtualization

How To Add PPP Kernel Support To OpenVZ Containers

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 03/19/2014

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

[...]
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.

 

4 Links

 

About The Author

Falko Timme is the owner of nginx HostingTimme 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".


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.