add mtu handling
This commit is contained in:
parent
3f3ed2fe15
commit
51fde95c0e
2 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ iface wg_{{ item.name }} inet manual
|
|||
post-down ip link del $IFACE
|
||||
pre-up ip link add $IFACE type wireguard || true
|
||||
pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf
|
||||
up ip link set dev $IFACE mtu {{ item.mtu }}
|
||||
{% if item.route|length == 1 and item.ip|length == 1%}
|
||||
pre-up ip a add {{ item.ip[0] }} peer {{ item.route[0] }} dev $IFACE
|
||||
up ip route replace {{ item.route[0] }} src {{ item.ip[0].split('/')[0] }} dev $IFACE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue