View Source tunctl_freebsd (tunctl v0.3.5)

tunctl behaviour for FreeBSD.

tunctl uses the FreeBSD tuntap legacy interface.

1. Ensure the tap device kernel module is loaded:

      $ kldstat
      $ kldload if_tap

If you want the tap driver loaded on boot, add to /boot/loader.conf:

      if_tap_load="YES"

2. Check cloning is enabled:

      $ sysctl net.link.tun.devfs_cloning
      net.link.tun.devfs_cloning: 1
 
      $ sysctl net.link.tap.devfs_cloning
      net.link.tap.devfs_cloning: 1

3. Allow the user running tunctl to call ifconfig using sudo:

      sudo visudo
      youruser ALL=NOPASSWD: /sbin/ifconfig tap*
      youruser ALL=NOPASSWD: /sbin/ifconfig tun*

Summary

Functions