Linux firewall network address

4 posts / 0 new
Last post
#1 Wed, 01/06/2010 - 21:39
tbirnseth

Linux firewall network address

What is the syntax to use to block an IP address as a network. I'm getting hammered by 138.163.xx.yy and want to block the whole 138.160.0.0 network.

Do I use 138.160.0.0/11 or is there a different specification for specifying a network versus an address?

Wed, 01/06/2010 - 21:49
andreychek

If you'd like to use iptables to block a host, you can use something like:

iptables -I INPUT -s 138.163.xx.yy  -j DROP

for a single IP, or for an entire network, you can use:

iptables -I INPUT -s 138.163.0.0/11  -j DROP

Wed, 01/06/2010 - 21:56
tbirnseth

I was wanting to use the Linux Firewall interface in VM. So should I specify the address of 138.163.0.0/11 and port 80 to block this broken caching proxy server installed at the Naval Information Center?

Thu, 01/07/2010 - 13:26
andreychek

Yeah, that should work just fine.

-Eric

Topic locked