LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   iptables (https://www.linuxquestions.org/questions/linux-networking-3/iptables-527667/)

xaos5 02-11-2007 08:13 PM

iptables
 
I made a script based on http://pgl.yoyo.org/adservers/index.php for slackware 11.0. The problem is every line it seems like the address I want to block is connect to.

Take this line for example (INTERFACE="ethX")
Code:

$IPTABLES -A OUTPUT -o INTERFACE -d 24pm-affiliation.com -j DROP
I get this error if it doesn't exist:
Code:

iptables v1.3.5: host/network `24pm-affiliation.com' not found
Try `iptables -h' or 'iptables --help' for more information.

Is there a better way to block ads though my router/NAT setup or a way for iptables to not try to connect?

I have over 1000+ lines that look like the above which makes loading the rules and viewing the rules (iptables -L) extremely slow.

SnotRocket 02-11-2007 08:36 PM

iptables is looking for an IP address or network, not a hostname. I would recommend filtering at the DNS level or perhaps using Squid.


All times are GMT -5. The time now is 09:16 PM.