I'm trying to prevent baner ads appearing on any computers within my Lan.

At the moment I'm adding these lines to my firewall rules every time I come accross a new ad server

Code:
iptables -A INPUT  -s some.adserver -j DROP
iptables -A OUTPUT -d some.adserver -j REJECT
iptables -A FORWARD -d some.adserver -j REJECT
iptables -A FORWARD -s some.adserver -j DROP
This seems to be doing the job for the most part, but its quite labourious hgaving to insert 4 lines for every ad server I come accross and my rules are going to get very large very quickly. :

What I'd rather be able to do is to say:

Code:
iptables -A INPUT  -s $adserver -j DROP
iptables -A OUTPUT -d $adserver -j REJECT
iptables -A FORWARD -d $adserver -j REJECT
iptables -A FORWARD -s $adserver -j DROP
And have a list of adservers that would be dropped. Is that doable? If so can someone please enlighten me.

Better still I'd like to be able to redirect requests for the adverts to my local machine and send a 1x1 transparent gif instead of the banner that was supposed to be loaded. Is that possible?

I just know someone will reccomend I use killads or something, but I'd rather have something dong the filtering on the gateway machine, that saves me having to mess about with every PC that gets connected to the LAN.

Thanks..