Explorar o código

template problem

aeth hai 8 meses
pai
achega
9ef00f56f9
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      templates/wg0.conf.j2

+ 3 - 3
templates/wg0.conf.j2

@@ -11,8 +11,8 @@ PreDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
 
 PostUp     = firewall-cmd --zone=public --add-port {{ vpn_server_port }}/udp && firewall-cmd --zone=public --add-masquerade
 PostDown   = firewall-cmd --zone=public --remove-port {{ vpn_server_port }}/udp && firewall-cmd --zone=public --remove-masquerade
-{% for client in clients}
+{% for client in clients %}
 [Peer]
-PublicKey = {{ client_public_key }}
-AllowedIPs = {{ client_vpn_address }}/{{ vpn_netmask }}
+PublicKey = {{ client.client_public_key }}
+AllowedIPs = {{ client.client_vpn_address }}/{{ vpn_netmask }}
 {% endfor %}