On Thu, 11 Apr 2013, Jimmy Thrasibule wrote: > Is it possible to match both source and destination from the same set. > > I have two networks: > > - 192.168.1.0/24 > - 192.168.2.0/24 > > And I'd like to match packets going from one to another (the set can be > bigger of course). > > Without ipset it would be: > > -A FORWARD -s 192.168.1.0/24 -d 192.168.2.0/24 -j ACCEPT > > However this won't work using ipset: > > -A FORWARD -m set --match-set mynets src,dst -j ACCEPT Apply two matches: -A FORWARD -m set --match-set mynets src -m set --match-set mynets dst ... Best regards, Jozsef - E-mail : kadlec@xxxxxxxxxxxxxxxxx, kadlecsik.jozsef@xxxxxxxxxxxxx PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences H-1525 Budapest 114, POB. 49, Hungary -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html