Sample Header Ad - 728x90

Using ipset with src OR dst in one rule?

0 votes
1 answer
2962 views
I am trying to write an iptables rule using ipset with one rule matching *src* or *dst* (or both). This iptables -A FORWARD -m set --match-set src,dst -j DROP does **not** work since it applies only if both *src* AND *dst* are in the *name_of_ipset*. I know that I could simply double the rule via iptables -A FORWARD -m set --match-set src -j DROP iptables -A FORWARD -m set --match-set dst -j DROP but I hope that there is **something more simple**?!
Asked by Schubi Duah (153 rep)
Apr 26, 2021, 04:19 AM
Last activity: Jul 20, 2025, 03:06 AM