Files
as205079-automation/ansible/roles/wireguard/templates/internal-wg-interface.j2

13 lines
499 B
Django/Jinja

[Interface]
ListenPort = 52{{ routers[item]['site_id'] }}{{ routers[item]['rtr_id'] }}
Address = {{ routers[shortname]['wg_ll'] }}/64
Table = off
MTU = 1500 # We fragment packets, this is intentional
PostUp = wg set %i private-key /etc/wireguard/privatekey
[Peer]
PublicKey = {{ routers[item]['wg_pubkey'] }}
Endpoint = {{ routers[item]['pub_ipv4'] | default(routers[item]['ipv4'] )}}:52{{ routers[shortname]['site_id']}}{{ routers[shortname]['rtr_id']}}
AllowedIPs = ::/0
PersistentKeepalive = 30