#9 Locking Out Hackers
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.
The Code
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 ...
Get Wicked Cool Perl Scripts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.