February 2006
Intermediate to advanced
304 pages
6h 16m
English
Finding out who's trying to hack your system is one thing. But what do you do about it? One solution is to lock out the attacking machine from your system for 30 minutes. This should slow down attempts by worms and script kiddies to access your system.
1 #!/usr/bin/perl 2 # WARNING: There are many different ways to lock 3 # a system out. This script uses 4 # /sbin/route add <ip> reject 5 # Adjust this command to suit your system. 6 # 7 # 8 # When someone tries to hack us, lock him out 9 # of the system for 30 minutes. 10 # 11 # Lockout is accomplished by setting the route 12 # for the bad systems to an impossible value 13 # 14 # 15 # Uses a simple technique to detect hacking 16 # entries, specifically 17 ...