K
K
kizijo2018-04-27 18:45:55
linux
kizijo, 2018-04-27 18:45:55

Why do rules in iptables on Debian stop working when connecting to a certain WiFi router?

Here are my current iptables firewall rules:

[email protected]:~# cat /etc/iptables/rules.v4
# Generated by iptables-save v1.6.0 on Wed Apr 25 12:57:29 2018
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT DROP [0:0]
COMMIT
# Completed on Wed Apr 25 12:57:29 2018
# Generated by iptables-save v1.6.0 on Wed Apr 25 12:57:29 2018
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [7:392]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Wed Apr 25 12:57:29 2018

The essence of the rule is to close the Internet so that nothing works.
And everything works as it should, BUT if you connect to a certain WiFi in a certain cafe, then these rules stop working and the Internet becomes available again. Can anyone tell why this might be happening? Where to look? Thank you.
Z.Y. To make these rules, use the following chain of commands:
iptables --flush
iptables --delete-chain
iptables -t nat --flush
iptables -t nat --delete-chain
iptables -P OUTPUT DROP

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question