Skip to content

Instantly share code, notes, and snippets.

@technoscavenger
Created May 8, 2025 03:00
Show Gist options
  • Select an option

  • Save technoscavenger/7277b422d0bb880bc31412e5b09af2c3 to your computer and use it in GitHub Desktop.

Select an option

Save technoscavenger/7277b422d0bb880bc31412e5b09af2c3 to your computer and use it in GitHub Desktop.
systemd unit for creating tap0
[Unit]
Description=Create TAP interface tap0
Before=network-pre.target
Wants=network-pre.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/sbin/ip tuntap add dev tap0 mode tap user u1
ExecStartPost=/sbin/ip link set tap0 up
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment