|
|
@ -7,10 +7,13 @@
|
|
|
|
{% for site in sites %}
|
|
|
|
{% for site in sites %}
|
|
|
|
-A PREROUTING -i bat{{ site.name }} -j MARK --set-xmark 0x1/0xffffffff
|
|
|
|
-A PREROUTING -i bat{{ site.name }} -j MARK --set-xmark 0x1/0xffffffff
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% for peer in wireguard_bb_peers %}
|
|
|
|
|
|
|
|
-A PREROUTING -i bb{{ peer.name }} -j MARK --set-xmark 0x1/0xffffffff
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
COMMIT
|
|
|
|
COMMIT
|
|
|
|
*filter
|
|
|
|
*filter
|
|
|
|
:INPUT DROP [0:0]
|
|
|
|
:INPUT DROP [0:0]
|
|
|
|
:FORWARD DROP [0:0]
|
|
|
|
:FORWARD ACCEPT [0:0]
|
|
|
|
:OUTPUT ACCEPT [0:0]
|
|
|
|
:OUTPUT ACCEPT [0:0]
|
|
|
|
-A INPUT -s 127.0.0.1/32 -j ACCEPT
|
|
|
|
-A INPUT -s 127.0.0.1/32 -j ACCEPT
|
|
|
|
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
|
|
|
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
|
|
@ -36,11 +39,12 @@ COMMIT
|
|
|
|
{% for site in sites %}
|
|
|
|
{% for site in sites %}
|
|
|
|
-A FORWARD -i bat{{ site.name }} -p udp --dport 10010:10021 -j REJECT
|
|
|
|
-A FORWARD -i bat{{ site.name }} -p udp --dport 10010:10021 -j REJECT
|
|
|
|
{% endfor %}
|
|
|
|
{% 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
|
|
|
|
COMMIT
|
|
|
|
*nat
|
|
|
|
*nat
|
|
|
|
:PREROUTING ACCEPT [0:0]
|
|
|
|
:PREROUTING ACCEPT [0:0]
|
|
|
|
:INPUT ACCEPT [0:0]
|
|
|
|
:INPUT ACCEPT [0:0]
|
|
|
|
:OUTPUT ACCEPT [0:0]
|
|
|
|
:OUTPUT ACCEPT [0:0]
|
|
|
|
:POSTROUTING ACCEPT [0:0]
|
|
|
|
:POSTROUTING ACCEPT [0:0]
|
|
|
|
|
|
|
|
-A POSTROUTING -o mullvad -j MASQUERADE
|
|
|
|
COMMIT
|
|
|
|
COMMIT
|
|
|
|