macro & iptables

/dev/rob0 rob0 at gmx.co.uk
Wed Aug 31 16:23:17 CEST 2005


On Wednesday 2005-August-31 09:13, Agung wrote:
> let say... i have lists of ip in /etc/iplist.txt
> is it possible to call that list, like perhaps in pf
> table <ip> persist file "/etc/iplist.txt" ?

Not to my knowledge. I don't think that design is as robust. iptables 
works entirely in the kernel memory. You can actually crash the OS, but 
the netfilter code will continue passing packets.

> or i should use some bash scripting ?

Yes:
#OPTIONS and TARGET must be set
while read IP ; do
    iptables $OPTIONS $IP $TARGET
done < /etc/iplist.txt

> thank you for your assistance :-)

np
-- 
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header



More information about the netfilter mailing list