7/19/2023 0 Comments Iptables examples![]() I have Postfix running OK and listening onto my 25th port. It works OK when I set it without any multiport options and blocks only one port like this: -A INPUT -p tcp -dport 80 -m set -match-set blocklist src -j DROPīut when I do the same thing but on the 25th port it won't work: -A INPUT -p tcp -dport 25 -m set -match-set blocklist src -j DROP are most welcome! Many thanks in advance! Could anybody advise, please where is there a mistake in my setting? Any pointers / assistance / suggestions, etc. However, when I connect from the IP address that is on the blocklist it does not block this IP address by saying connection timed out, it simply gets connected and goes right through. It says my iptables' rule is there and in action. When I verify it with ipset test blocklist (IP address here) and press enter A INPUT -p tcp -match multiport -dport 25,587 -m set -match-set blocklist src -j DROP Then I create my ipset and reference it like this: ipset create blocklist nethashįor i in $(cat /path/to/blocklist) do ipset add blocklist $i done I create a simple file with IP addresses I would like to block and call it blocklist. I cannot really understand why it does not seem to work. I would highly appreciate it if someone could help on a quite simple ipset rule I am trying to set up.
0 Comments
Leave a Reply. |