[H-GEN] iptables assistance

Stuart Longland stuartl at longlandclan.hopto.org
Thu Jun 23 22:14:50 EDT 2005


James Mills wrote:
> iptables -A INPUT -p all -i ppp0 -s 202.163.12.3/24 -j DROP
> 
> Something like this... Assuming 202.163.12.3/24 is the IP block of the
> ISP... That you would have to work out...

And that, something `whois` will sometimes be able to tell you. :-)

e.g.
> (01:34) stuartl at beast stuartl $ whois 202.47.55.78
> % [whois.apnic.net node-2]
> % Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html
> 
> inetnum:      202.47.32.0 - 202.47.63.255 <-- *there*
> netname:      ICC2-AU
> descr:        Global Info-Links IP Pool
> ...

Sometimes they also give you an explicit CIDR (ip-wire/netmask suffix)
too, but not all.
-- 
+-------------------------------------------------------------+
| Stuart Longland -oOo- http://stuartl.longlandclan.hopto.org |
| Atomic Linux Project     -oOo-    http://atomicl.berlios.de |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| I haven't lost my mind - it's backed up on a tape somewhere |
+-------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20050624/afc793ce/attachment.sig>


More information about the General mailing list