tunctl [ Options ] [ -u owner ] [ -t device-name ]
tunctl -d device-name
tunctl allows the host sysadmin to preconfigure a TUN/TAP network interface for use by a particular user. That user may open and use the network/write side of the interface, but may not change any aspects of the host side of the interface.
Brief output, prints just the interface name
Create a point-to-point TUN interface without Ethernet header. Automatically enabled if the desired interface name starts with "tun".
Create a TAP type interface with Ethernet header. Automatically selected if the desired interface starts with "tap" or if no interface name is given.
- -f tun-clone-device
Specifies the tun clone device name. The default is /dev/net/tun, but some systems use /dev/misc/net/tun instead.
- -d interfacename
Delete the specified interfacename (set it to non-persistent)
- -u user
Specifies the owner of the interface. This user is allowed to attach to the "network/wire" side.
- -g group
Specifies the group of the interface. This group is allowed to attach to the "network/wire" side of the interface.
- -t interface
Specifies the desired interface name.
To create an interface for use by a particular user, invoke tunctl without the -d option:
# tunctl -u someuser Set 'tap0' persistent and owned by 'someuser'
Then, configure the interface as normal:
# ifconfig tap0 192.168.0.254 up # route add -host 192.168.0.253 dev tap0 # bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp' # arp -Ds 192.168.0.253 eth0 pub
To delete the interface, use the -d option:
# tunctl -d tap0 Set 'tap0' nonpersistent
The UserModeLinux-HOWTO <URL:http://user-mode-linux.sourceforge.net/old/UserModeLinux-HOWTO.html>
tunctl was originally written by Jeff Dike <email@example.com> as part of the User Mode Linux tools. Current version is maintained as a separate package by Henrik Nordstrom <firstname.lastname@example.org>.
This manual page was originally written by Matt Zimmerman <email@example.com> for the Debian GNU/Linux system, based on examples from Jeff Dike. Extended by Henrik Nordstrom <firstname.lastname@example.org> to cover all options supported.