Pārlūkot izejas kodu

template problem

aeth 8 mēneši atpakaļ
vecāks
revīzija
9ef00f56f9
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  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 %}