Make wireguard mtu configurable
This commit is contained in:
parent
80e101768f
commit
444308d6a5
3
vpn/wireguard/defaults/main.yml
Normal file
3
vpn/wireguard/defaults/main.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
vpn_wireguard_iface: "wg0"
|
||||
vpn_wireguard_mtu: 1420
|
@ -9,6 +9,9 @@ argument_specs:
|
||||
vpn_wireguard_iface:
|
||||
type: "str"
|
||||
required: true
|
||||
vpn_wireguard_mtu:
|
||||
type: "int"
|
||||
required: true
|
||||
vpn_wireguard_role:
|
||||
type: "str"
|
||||
required: true
|
||||
|
@ -2,7 +2,7 @@ auto {{ vpn_wireguard_iface }}
|
||||
iface {{ vpn_wireguard_iface }} inet static
|
||||
pre-up /usr/local/sbin/ip-link-add.sh $IFACE type wireguard
|
||||
pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf
|
||||
pre-up ip link set mtu 1420 dev $IFACE
|
||||
pre-up ip link set mtu {{ vpn_wireguard_mtu }} dev $IFACE
|
||||
|
||||
post-up /usr/local/sbin/post-up-$IFACE-inet.nft
|
||||
post-up /usr/local/sbin/post-up-$IFACE-ipv4.nft
|
||||
|
Loading…
Reference in New Issue
Block a user