These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Linux firewall network address on the new forum.
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?
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
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?
Yeah, that should work just fine.
-Eric