vde_tunctl — create and manage persistent TUN/TAP interfaces
Contents
Description
vde_tunctl allows the host sysadmin to preconfigure a TUN/TAP device for use by a particular user. That
user may open and use the device, but may not change any aspects of the host side of the interface.
vde_tunctl is an extension of tunctl.
vde_tunctl defines tap interfaces unless dev-name begins by "tun" or the option -n appears in the command
line.
Name
vde_tunctl — create and manage persistent TUN/TAP interfaces
See Also
vde_switch(1) vde_plug2tap(1)
Synopsis
vde_tunctl [-fclone-dev] [-uowner] [-ggroup] [-n] [-tdev-name]
vde_tunctl [-fclone-dev] -ddev-nameUsage
To create an interface for use by a particular user, invoke tunctl without the -d option:
# vde_tunctl-usomeuser
Set 'tap0' persistent and owned by uid 500
Then, configure the interface as normal:
# ifconfigtap0192.168.0.254up
# routeadd-host192.168.0.253devtap0
# bash-c'echo1>/proc/sys/net/ipv4/conf/tap0/proxy_arp'
# arp-Ds192.168.0.253eth0pub
To delete the interface, use the -d option:
# vde_tunctl-dtap0
Set 'tap0' nonpersistent
To create or destroy a tun interface (instead of tap):
# vde_tunctl-n-usomeuser
Set 'tun0' persistent and owned by uid 500
# vde_tunctl-dtun0
Set 'tun0' nonpersistent
