{"id":267,"date":"2005-02-28T22:02:21","date_gmt":"2005-02-28T21:02:21","guid":{"rendered":"http:\/\/wp.devco.net\/?p=267"},"modified":"2009-10-09T17:08:06","modified_gmt":"2009-10-09T16:08:06","slug":"ipfw_tables","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2005\/02\/28\/ipfw_tables.php","title":{"rendered":"ipfw tables"},"content":{"rendered":"

FreeBSD<\/a> has recently added a method for storing large amounts of cidr addresses in a lookup table that can then be matched in a single rule.
\nI use these on my
country blocking<\/a> to optimize things a bit.
\nPreviously I put a large block of ipfw deny<\/i>‘s very early up in my rule set and just block it all on everything. This was not optimal since for some IP’s I’d like to keep certain ports open – like port 80. I did not want to have per host block lists since that would mean hosts x 3000 rules. Lookup tables are the answer.
\nMy current setup goes more or less like this:<\/p>\n