fix wireguard
This commit is contained in:
parent
baf26860e6
commit
1e694c3769
@ -1 +1,7 @@
|
|||||||
---
|
---
|
||||||
|
- name: restart wireguard service
|
||||||
|
service:
|
||||||
|
name: wg-quick@{{ cloud_name }}
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
when: wireguard_installed is defined and not wireguard_installed.changed
|
||||||
@ -16,10 +16,10 @@ PreUp = iptables -t nat -A POSTROUTING -o {{ cloud_name }} -j MASQUERADE
|
|||||||
PostDown = iptables -t nat -D POSTROUTING -o {{ cloud_name }} -j MASQUERADE
|
PostDown = iptables -t nat -D POSTROUTING -o {{ cloud_name }} -j MASQUERADE
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for client in vpn_clients %}
|
{% for vpn_client in vpn_clients %}
|
||||||
## vpn {{ cloud_name }} - {{ client }} ##
|
## vpn {{ cloud_name }} - {{ vpn_client }} ##
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = {{ vpn_clients[client].public_key }}
|
PublicKey = {{ vpn_client.public_key }}
|
||||||
AllowedIPs = {{ vpn_gateway_net_prefix }}.{{ vpn_clients[client].index }}/32
|
AllowedIPs = {{ vpn_gateway_net_prefix }}.{{ vpn_client.index }}/32
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
Loading…
Reference in New Issue
Block a user