Update some vars
This commit is contained in:
parent
47ae9f14eb
commit
6f146f527c
@ -1,3 +1,8 @@
|
||||
- name: Include sensitive info
|
||||
include_vars:
|
||||
dir: '/vault/main.yml'
|
||||
tags:
|
||||
- vault
|
||||
- name: Copy configuration files
|
||||
loop:
|
||||
- { src: "wireguard.conf.j2", dest: "/etc/wireguard/wg0.conf", mode: '600' }
|
||||
|
@ -1,12 +1,12 @@
|
||||
[Interface]
|
||||
Address = {{ services.wireguard.net.v4.addr }}.1/{{ services.wireguard.net.v4.range.serv }}, {{ services.wireguard.net.v6.addr }}:1/{{ services.wireguard.net.v6.range.serv }}
|
||||
PostUp = iptables -A FORWARD -i {{ services.wireguard.interface }} -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i {{ services.wireguard.interface }} -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
PostDown = iptables -D FORWARD -i {{ services.wireguard.interface }} -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i {{ services.wireguard.interface }} -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
|
||||
ListenPort = {{ services.wireguard.port }}
|
||||
Address = {{ wireguard.net.v4.addr }}.1/{{ wireguard.net.v4.range.serv }}, {{ wireguard.net.v6.addr }}:1/{{ wireguard.net.v6.range.serv }}
|
||||
PostUp = iptables -A FORWARD -i {{ wireguard.interface }} -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i {{ wireguard.interface }} -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
PostDown = iptables -D FORWARD -i {{ wireguard.interface }} -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i {{ wireguard.interface }} -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
|
||||
ListenPort = {{ wireguard.port }}
|
||||
PrivateKey = {{ wg.privkey }}
|
||||
|
||||
{% for user in services.wireguard.peers %}
|
||||
[Peer]
|
||||
PublicKey = {{ user.pubkey }}
|
||||
AllowedIPs = {{ services.wireguard.net.v4.addr }}.{{ user.bit }}/{{ services.wireguard.net.v4.range.clnt }}, {{ services.wireguard.net.v6.addr}}:{{ user.bit }}/{{ services.wireguard.net.v6.range.clnt }}
|
||||
AllowedIPs = {{ wireguard.net.v4.addr }}.{{ user.bit }}/{{ wireguard.net.v4.range.clnt }}, {{ wireguard.net.v6.addr}}:{{ user.bit }}/{{ wireguard.net.v6.range.clnt }}
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user