How to create TUN/TAP on LXC Container

To actually use a tun/tap device it must be created inside the container on every boot, so add the following to your /etc/rc.local inside your container:

if ! [ -c /dev/net/tun ]; then
 mkdir -p /dev/net
 mknod -m 666 /dev/net/tun c 10 200
fi

thats it!

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Migrating/Restoring large cPanel domain from shared hosting account to your VPS server

cPanel facilitates you to restore full domain including email accounts, MySQL databases, database...

Basic Linux Commands

Below is a brief guide for basic usage of a Linux shell (command line). Once you've mastered the...

Basic iptables usage

Iptables is a program that allows you to configure Linux's built-in firewall. By default, no...

Installing CSF (ConfigServer Firewall) on a server

This guide will walk you through installing CSF on a VPS/Dedicated server. Preparing the server...

How to SSH into your VPS

After receiving your VPS login details, the first thing you'll want to do is log in to the VPS....