TIP_Block_an_IP
| Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
A simple line to block an IP with iptables
iptables -I INPUT -s 146.83.34.32 -j DROP
To view blocked IPs and other iptables commands:
iptables -L -n
Batch block IP's
It's plain and simple, works great on my firewall:
script:
#!/bin/sh for i in $(< bad_hosts.lst) ; do iptables -I INPUT -i eth1 -s "$i" -j DROP done
bad_hosts.lst:
192.168.2.1 192.168.2.2 ...
Last modified: Sun, 18 Feb 2007 16:06:00 +1100 Hits: 8,276
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and real estate agent tools.
