Skip to content

Instantly share code, notes, and snippets.

@wheberth
Last active June 17, 2020 15:12
Show Gist options
  • Save wheberth/6dfc52d8b514e370c64b5027a44d549e to your computer and use it in GitHub Desktop.
Save wheberth/6dfc52d8b514e370c64b5027a44d549e to your computer and use it in GitHub Desktop.
Adds persistent tun interface in network manager (nmcli)
#!/bin/bash
# Adds a tun interface for a point to point link in nmcli and sets the MTU to 9000 bytes
# the created inteface belongs to the group 27 (sudo in Ubuntu 18.04)
# You need to run only once, as the interface is permanent
nmcli connection add type tun mode tun group 27 ifname radiotun0 con-name radiotun0 eth.mtu 9000 ip4 10.0.0.3/29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment