summaryrefslogtreecommitdiff
path: root/roles/configure_iptables/templates/iptables.rules
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2017-07-16 13:45:10 +0200
committerNiklas Yann Wettengel <niyawe@niyawe.de>2017-07-16 13:45:10 +0200
commit5ec7d9ba3e0b2d6a55e5030f643fd4f90593fccf (patch)
treeae80957e60499292c19c8d12add72f034498d65e /roles/configure_iptables/templates/iptables.rules
parenta72158a848349b4d56ace77ff5da78c577cfb968 (diff)
route changes
Diffstat (limited to 'roles/configure_iptables/templates/iptables.rules')
-rw-r--r--roles/configure_iptables/templates/iptables.rules8
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/configure_iptables/templates/iptables.rules b/roles/configure_iptables/templates/iptables.rules
index 363958d..6da350c 100644
--- a/roles/configure_iptables/templates/iptables.rules
+++ b/roles/configure_iptables/templates/iptables.rules
@@ -7,10 +7,13 @@
{% for site in sites %}
-A PREROUTING -i bat{{ site.name }} -j MARK --set-xmark 0x1/0xffffffff
{% endfor %}
+{% for peer in wireguard_bb_peers %}
+-A PREROUTING -i bb{{ peer.name }} -j MARK --set-xmark 0x1/0xffffffff
+{% endfor %}
COMMIT
*filter
:INPUT DROP [0:0]
-:FORWARD DROP [0:0]
+:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -s 127.0.0.1/32 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
@@ -36,11 +39,12 @@ COMMIT
{% for site in sites %}
-A FORWARD -i bat{{ site.name }} -p udp --dport 10010:10021 -j REJECT
{% endfor %}
--A FORWARD -m limit --limit 2/min -j LOG --log-prefix "IPTables-Dropped forward: " --log-level 4
+-A FORWARD -o {{ ansible_default_ipv4.interface }} -j REJECT
COMMIT
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
+-A POSTROUTING -o mullvad -j MASQUERADE
COMMIT