Posts

Showing posts from February, 2009

Blocking non-icelandic traffic

Since IOS 12.4(20)T the object-group network command has been introduced outside of the ASA family. And since rix.is holds out a list of icelandic subnets i got the idea to open access to various services only to icelanders :) The idea isn't new but i hope the scripts i created with the help of my dear friend Jón Rúnar will help someone out there. What we have is very basic stuff, we have a shell script run by cron on a CentOS box that executes wget to grab the list from RIX, a python script to edit the text file so that an ASA/Cisco IOS can use the list, and then an expect script to update the list on the device. bash script http://www.internetworkpro.org/pastebin/1066/ here we have two branches depending on your platform: edit the subnet list from RIX for ASA input http://www.internetworkpro.org/pastebin/1067/ expect script for ASA http://www.internetworkpro.org/pastebin/1071/ edit the subnet list from RIX for Cisco IOS input http://www.internetworkpro.org/pastebin/1069/ expect s