29 Jun
2005
29 Jun
'05
4:41 a.m.
On Thu, 30 Jun 2005 09:00, James J. Guidera wrote:
Just a quick question,
Is there a singular complete list of NZ ip range?? I am wanting to allow only NZ traffic access to servers.
/usr/bin/wget ftp://ftp.apnic.net/pub/apnic/dbase/data/country-ipv4.lst -O /tmp/country-ipv4.lst for NZIP in `cat /tmp/country-ipv4.lst |grep nz | awk '{print $5}'` ; do echo Allowing ${NZIP} ${IPTABLES} -t filter -A INETIN -p tcp --sport 20 --dport 1024:65535 -s $NZIP -j TCPACCEPT done Probably an easier way to do it somewhere, but that works for me ;] Liz
Thanks
James Guidera
Systems Engineer
Miracle Electronics Ltd
Ph:+64-4-385-1293
Cel: +64-21-705-614
-- It's been discovered that research causes cancer in rats.