diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-24 00:08:18 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-24 00:08:18 +0200 |
commit | df1fe00b6cb85de2b543fe9e7318f1d28bba09ec (patch) | |
tree | c19acb9c2dfcde5184d74874defb1050b07809d5 | |
parent | v0.0.20 (diff) | |
download | infra-ansible-df1fe00b6cb85de2b543fe9e7318f1d28bba09ec.tar.gz infra-ansible-df1fe00b6cb85de2b543fe9e7318f1d28bba09ec.zip |
wireguard: wg_firewall -> wg_router
-rw-r--r-- | roles/wireguard/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/wireguard/templates/wg0.conf.j2 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/wireguard/defaults/main.yml b/roles/wireguard/defaults/main.yml index b351a4b..44120db 100644 --- a/roles/wireguard/defaults/main.yml +++ b/roles/wireguard/defaults/main.yml @@ -4,4 +4,4 @@ wg_listen_port: 51280 #wg_addr4: #wg_addr6: #wg_peers: -wg_firewall: false +wg_router: false diff --git a/roles/wireguard/templates/wg0.conf.j2 b/roles/wireguard/templates/wg0.conf.j2 index fca9a0b..7dae2ff 100644 --- a/roles/wireguard/templates/wg0.conf.j2 +++ b/roles/wireguard/templates/wg0.conf.j2 @@ -6,7 +6,7 @@ Address = {{ wg_addr4 }}, {{ wg_addr6 }} ListenPort = {{ wg_listen_port }} SaveConfig = false -{% if wg_firewall %} +{% if wg_router %} PostUp = iptables -t nat -A POSTROUTING -s {{ wg_addr4 }} -m policy --pol none --dir out -j MASQUERADE PostUp = iptables -A FORWARD -s {{ wg_addr4 }} -j ACCEPT PostUp = ip6tables -t nat -A POSTROUTING -s {{ wg_addr6 }} -m policy --pol none --dir out -j MASQUERADE |