LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IPChains hostname has multiple IPs is resolves to? (https://www.linuxquestions.org/questions/linux-networking-3/ipchains-hostname-has-multiple-ips-is-resolves-to-26800/)

Ionized 07-29-2002 11:20 PM

IPChains hostname has multiple IPs is resolves to?
 
I want to block the hostname ads.web.aol.com (don't we all). I've attempted to put in a clause in my firewall script as such:

ipchains -A input -b -i eth0 -p tcp -s ads.web.aol.com -d $MYIP -j REJECT

but it doesn't seam to work.
I'm wondering...is ipchains unable to work with hostnames that resolve to multiple IP addresses?

MartBrooks 07-30-2002 01:03 AM

ipchains will block whichever IP ads.web.aol.com resolves to when the rule is inserted. It won't re-evaluate the IP until the rule is flushed and reloaded.

You'll need to block all the IPs associated with the A record. Better still you could use squid and squidguard to block banners.

Regards


All times are GMT -5. The time now is 06:48 PM.