Attached is a new "route" match, which matches against entries in the kernel routing table. I've had a need for this functionality for quite some time, and finally decided to code it up. TODO: add IPv6 support to kernel side Options [!] --route-src-exists Route for src exists --route-src-eq value Route for src exists with prefix-length == value --route-src-gt value Route for src exists with prefix-length > value --route-src-lt value Route for src exists with prefix-length < value [!] --route-dst-exists Route for dst exists --route-dst-eq value Route for dst exists with prefix-length == value --route-dst-gt value Route for dst exists with prefix-length > value --route-dst-lt value Route for dst exists with prefix-length < value Examples: Egress filtering: iptables -A FORWARD -m route ! --route-src-exists -j DROP Ingress filtering: iptables -A FORWARD -i $EXTERNAL_IF -m route --route-src-exists -j DROP Allow a user to only browse internal websites: iptables -A FORWARD -p tcp --dport 80 -m route --route-dst-exists -j ACCEPT Allow an SNMP collector to reach all internal routers (/30 or /32 interfaces) iptables -A FORWARD -p udp --dport 161 -m route --route-dst-gt 29 -j ACCEPT Please let me know if anyone else finds this match useful. Phil