Initial commit
This commit is contained in:
commit
b32819380a
9 changed files with 131 additions and 0 deletions
14
templates/wg0.conf.j2
Normal file
14
templates/wg0.conf.j2
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Interface]
|
||||
Address = {{ wireguard_server_CIDR }}
|
||||
SaveConfig = true
|
||||
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o {{ wireguard_iface_name }} -j MASQUERADE
|
||||
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o {{ wireguard_iface_name }} -j MASQUERADE
|
||||
ListenPort = 51900
|
||||
PrivateKey = {{ wireguard_server_privkey }}
|
||||
|
||||
{% for client in wireguard_clients %}
|
||||
[Peer]
|
||||
PublicKey = {{ client.pubkey }}
|
||||
AllowedIPs = {{ client.ipv4 }}
|
||||
|
||||
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue