T
T
Talyan2020-12-11 20:49:59
linux
Talyan, 2020-12-11 20:49:59

Why are ICMP requests going through to my computer despite iptables?

iptables has a rule:

# Completed on Fri Dec 11 20:46:49 2020
# Generated by iptables-save v1.8.6 on Fri Dec 11 20:46:49 2020
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:f2b-sshd - [0:0]
-A INPUT -p icmp -m icmp --icmp-type 0 -j DROP
-A INPUT -p tcp -m tcp --dport 22 -j f2b-sshd
-A INPUT -p tcp -m multiport --dports 22 -j f2b-sshd
-A OUTPUT -p icmp -m icmp --icmp-type 8 -j DROP


I see ICMP responses with wireshark, but they are also blocked...

There is a suspicion that the rule is added to CHAIN ​​f2b-sshd , although I added the rules themselves like this:
sudo iptables -I INPUT -p icmp -m icmp --icmp-type 0 -j DROP
sudo iptables -I OUTPUT -p icmp -m icmp --icmp-type 8 -j DROP

bish I did not specify that they need to be added to the chain :f2b-sshd

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Aleksandrov, 2020-12-11
@flapflapjack

Order of rules =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question