21 lines
526 B
Text
21 lines
526 B
Text
|
[NetDev]
|
||
|
Name=dn42{{ item['remotename'] }}
|
||
|
Kind=wireguard
|
||
|
|
||
|
[WireGuard]
|
||
|
PrivateKeyFile=/etc/systemd/network/wg.key
|
||
|
{% if item['localport'] is defined %}
|
||
|
ListenPort={{ item['localport'] }}
|
||
|
{% endif %}
|
||
|
|
||
|
[WireGuardPeer]
|
||
|
{% if item['remotehost'] is defined %}
|
||
|
# {{ item['remotehost'] }}
|
||
|
{% endif %}
|
||
|
{% if item['remoteip'] is defined %}
|
||
|
Endpoint={{ item['remoteip'] }}:{{ item['remoteport'] }}
|
||
|
{% endif %}
|
||
|
PublicKey={{ item['publickey'] }}
|
||
|
PersistentKeepalive=15
|
||
|
AllowedIPs=fe80::/64 fd00::/8 172.20.0.0/14 172.31.0.0/16 10.0.0.0/8
|