Answer the question
In order to leave comments, you need to log in
How to block incoming ip per port?
How can I block incoming ip per port? It is to block, not to discard.
For example, I have such a rule, it writes logs with ip addresses entering the port, so they need to be banned immediately.
But I do not understand how to do it, tell me if anyone knows?
sudo iptables -t filter -A FORWARD -s 192.168.0.0/16 -m tcp -p tcp --dport 25 -j LOG --log-prefix "iptables: "
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question