Nov 26, 2021 · 1. Your code does work. The problem is somewhere else. You can check whether your rule is hit at all with. iptables -nvL INPUT. Maybe you accidentally use IPv6 (if the used address is localhost; use 127.0.0.1 instead). Or in addition to iptables its successor nftables is in use. Check with. nft list ruleset.. "/>
dk
pd
dp