# VA1DER - qro.va1der.ca WireGuard interface config # # Interface definition file for wireguard interface wg0 # Tell the system to bring wg0 up at boot or ifup -a auto wg0 # wg interfaces are static IPv4 interfaces iface wg0 inet static # static IP address of server on a /24 address 10.30.1.1/24 # before ifup, create the device with this ip link command and set # the wg config file pre-up ip link add $IFACE type wireguard pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf # after ifup make sure we're forwarding the wg interface post-up /etc/wireguard/$IFACE.up # after ifdown, destroy the wg0 interface post-down ip link del $IFACE # end.