Server config {{ server }}:{{ port }}
/interface wireguard
add listen-port={{ port }} mtu=1420 name={{interfacename}} private-key="{{ serverkeys.privateKey }}"
/ip firewall filter
add action=accept chain=input comment="Allow Wireguard from All" dst-port={{port}} protocol=udp
add action=accept chain=input comment="Allow DNS from Wireguard Users" dst-port=53 in-interface={{interfacename}} protocol=udp
/ip address
add address={{ network }}.1/24 comment="Wireguard Interface" interface={{ interfacename }} network={{ network }}.0
/interface wireguard peers
{{ line }}
add allowed-address={{ network }}.{{ client }}/32 comment="{{ value.name }}" endpoint-address={{ network }}.{{ client }} interface={{interfacename}} public-key="{{ value.publicKey }}" preshared-key="{{ value.preSharedKey }}"