ABHIONLINUX
Site useful for linux administration and web hosting

2009/08/20

How to block an IP using IPTABLES

To block a range of IPs :

iptables -A INPUT -p tcp --destination-port 80 -m iprange --src-range 192.168.0.0-192.168.0.255 -j DROP

Forcing fsck on reboot

Inorder to force fsck on reboot give the following command

shutdown -rF now

Another way is just touch a file called .autofsck on / and reboot (Usually that file will be there by default.)