2024-12-25 06:29:32 +00:00
|
|
|
[NetDev]
|
|
|
|
Name=dn42{{ item['remotename'] }}
|
|
|
|
Kind=wireguard
|
2024-12-25 09:43:27 +00:00
|
|
|
Description=DN42 peering with AS{{ item.asn }} @ {% if item.remotehost is defined %}{{ item.remotehost }}[{{ item.remoteip }}]:{{ item.remoteport }}{% else %}[{{ item.remoteip }}]:{{ item.remoteport }}{% endif %}
|
2024-12-25 06:29:32 +00:00
|
|
|
|
|
|
|
[WireGuard]
|
2024-12-26 04:12:21 +00:00
|
|
|
{% if item.keypath is defined %}
|
|
|
|
PrivateKeyFile={{ item.keypath }}
|
|
|
|
{% else %}
|
2024-12-25 06:29:32 +00:00
|
|
|
PrivateKeyFile=/etc/systemd/network/wg.key
|
2024-12-26 04:12:21 +00:00
|
|
|
{% endif %}
|
2024-12-25 06:29:32 +00:00
|
|
|
{% 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
|
2024-12-26 04:12:21 +00:00
|
|
|
{% if item.pskpath is defined %}
|
|
|
|
PresharedKeyFile={{ item.pskpath }}
|
|
|
|
{% endif %}
|