ipset allows administration of sets of IP addresses/networks, ports, MAC addresses, and interfaces, which are stored in hash or bitmap data structures. These can then be used in conjunction with iptables to do fast presence lookups.
cb5b02deab8521946fd473b77c40f00452b76fed621f0eee76746c74e89e4c3c