logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tunctl — create and manage persistent TUN/TAP interfaces

Author

       tunctl was written by Jeff Dike jdike@karaya.com

       This manual page was written by Matt Zimmerman mdz@debian.org for the DebianGNU/Linux system,  based  on
       examples from Jeff Dike.

                                                                                                       TUNCTL(8)

Description

       This manual page documents briefly the tunctl command.

       This  manual page was written for the DebianGNU/Linux distribution because the original program does not
       have a manual page.  Instead, it has documentation in HTML format; see below.

       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.

Name

       tunctl — create and manage persistent TUN/TAP interfaces

See Also

Synopsis

tunctl [-ftun-clone-device]  [-uowner]  [-tdevice-name]

       tunctl [-ftun-clone-device]  -ddevice-name

Usage

       To create an interface for use by a particular user, invoke tunctl without the -d option:

       #
       tunctl-usomeuser
       Set 'tap0' persistent and owned by 'someuser'

       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:

       #
       tunctl-dtap0
       Set 'tap0' nonpersistent

See Also