• Article for your preferred language does not exist. Below is international version of the article.
Versioni tradotte dell'articolo:

How to configure TUN/TAP devices inside a container to install VPN software

  • Parallels Virtuozzo Containers for Linux
  • Parallels Server


Follow the steps below to configure the TUN/TAP device in the container:

  1. Make sure the tun module is loaded on the hardware node:

    # lsmod | grep tun
    tun                    18979  0

For RHEL 4/5-based distributions create a separate file /etc/init.d/addtun, link it to the proper runlevel and make it executable:

    [root@mypvc ~]# cat /etc/init.d/addtun
    /sbin/modprobe tun
    [root@mypvc ~]# ln -s /etc/init.d/addtun /etc/rc3.d/S10addtun
    [root@mypvc ~]# chmod +x /etc/init.d/addtun

At next server reboot tun module should be loaded.

For RHEL/CentOS 6.x based distributions create a separate file /etc/sysconfig/modules/vztun.modules to let it load automatically during the boot time:

    /sbin/modprobe tun

This file should be executable. You can make it executable by running:

    # chmod +x /etc/sysconfig/modules/vztun.modules

This module tun is supposed to be loaded before the Virtuozzo service is started, so run

    # service vz restart

to let Virtuozzo acknowledge this module's availability (all containers will be restarted). On SuSE-based systems, add the tun module into the MODULES_LOADED_ON_BOOT variable in /etc/sysconfig/kernel file (it should be processed by the /etc/init.d/boot.loadmodules initialization script).

  1. Allow the container to use the TUN/TAP device:

    # vzctl set CTID --devnodes net/tun:rw --save
  2. Set capability:

    # vzctl set $CTID --capability net_admin:on --save
  3. Install VPN software, which requires TUN/TAP interface such as Virtual TUNnel or OpenVPN.

Cerca parole:

up tun device

ca05eaf5b843fbd53589c90d7228a6df 2897d76d56d2010f4e3a28f864d69223 eb0ea3b827d18de2329b6477e24c1d59 909d99074e442b52ce54cc7b31cf065d

Questo articolo è stato utile?
Facci sapere come possiamo migliorarlo.
Virtualizzazione di Desktop
- Parallels Desktop 8 per Mac
- Parallels Desktop Switch to Mac Edition
- Enterprise
- Parallels Desktop per Mac Enterprise Edition
- Parallels Management Suite per Microsoft SCCM
- Tutti i Prodotti di virtualizzazione di desktop »
Piattaforme di Hosting & di Automazione di Cloud
Parallels Plesk Panel Suite
- Parallels Plesk Panel
- Parallels Plesk Automation
- Parallels Web Presence
Parallels Automation Suite
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
Parallels Virtualization Suite
- Parallels Cloud Server
- Parallels Virtuozzo Containers
- Parallels Virtual Automation
Servizi & Risorse
- Services Cloud Acceleration
- Servizi professionali
- Servizi di supporto
- Training & Certificazione