TUNCTL(8)TUNCTL(8)NAME
tunctl - create and manage persistent TUN/TAP interfaces
SYNOPSIS
tunctl [ OPTIONS ] [ -u owner ] [ -t device-name ]
tunctl -d device-name
DESCRIPTION
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.
OPTIONS-b Brief output, prints just the interface name
-n Create a point-to-point TUN interface without Ethernet header.
Automatically enabled if the desired interface name starts with
"tun".
-p 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.
USAGE
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
SEE ALSO
The UserModeLinux-HOWTO <URL:http://user-mode-linux.source‐
forge.net/old/UserModeLinux-HOWTO.html>
AUTHOR
tunctl was originally written by Jeff Dike <jdike@karaya.com> as part
of the User Mode Linux tools. Current version is maintained as a sepa‐
rate package by Henrik Nordstrom <henrik@henriknordstrom.net>.
This manual page was originally written by Matt Zimmerman
<mdz@debian.org> for the Debian GNU/Linux system, based on examples
from Jeff Dike. Extended by Henrik Nordstrom <henrik@henriknord‐
strom.net> to cover all options supported.
July 9, 2008 TUNCTL(8)