diff options
Diffstat (limited to 'roles/configure_iptables/templates/ip6tables.rules')
-rw-r--r-- | roles/configure_iptables/templates/ip6tables.rules | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/roles/configure_iptables/templates/ip6tables.rules b/roles/configure_iptables/templates/ip6tables.rules index 3ae179f..5b7a49c 100644 --- a/roles/configure_iptables/templates/ip6tables.rules +++ b/roles/configure_iptables/templates/ip6tables.rules @@ -1,6 +1,19 @@ +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +{% 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 }} ! -s fe80::/64 ! -d fe80::/64 -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 -i lo -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT @@ -33,5 +46,5 @@ {% 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 "IP6Tables-Dropped forward: " --log-level 4 +-A FORWARD -o {{ ansible_default_ipv6.interface }} -j REJECT COMMIT |