|
||||||
| Linux Security Make your Linux box more secure - Learn How |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
||||
|
Ban their IP Address when you discover they are trying to hack.
Here is how: 1. Login to your server via SSH and su - to root (do not forget the - after su). 2. After logging in as root, you may want to look at what's already loaded, if anything. To look at the tables that are currently in effect: (Note: You might need to add "| less" to the end of your iptables -L commands if you have a lot of iptables rules. This will let you view the rules one page at a time. You can use "q" to quit.) # iptables -L -n 3. To successfully block an IP address, the syntax would be: # iptables -I INPUT -s IP_ADDRESS_HERE -j DROP e.g.: # iptables -I INPUT -s 123.123.123.123 -j DROP 4. To verify that your entry was successful: (Note: You might need to add "| less" to the end of your iptables -L commands if you have a lot of iptables rules. This will let you view the rules one page at a time. You can use "q" to quit.) (as root still) # /sbin/iptables -L -n 5. If you want to flush your IPtables: # /sbin/iptables -F You can find other options to choose from with the following command: # /sbin/iptables --help Block From: [Linux] Block IP Address using IPtables - Webmaster Forum |
| Sponsored Links |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Tar in linux to make a backup | Onur | Tutorials, Guides and Tips | 2 | 06-27-2008 12:38 PM |
| Who needs Windows Home Server with Linux around? | kernel | Linux News | 0 | 08-22-2007 08:37 PM |
| "Linux more secure than Windows", Microsoft vulnerability report suggests | kernel | Linux News | 0 | 08-21-2007 04:15 PM |
| Cobbler: How to set up a network boot server in 10 minutes | kernel | Linux News | 0 | 08-11-2007 11:50 AM |
| Web Server with Solaris | Jame | Solaris | 1 | 05-27-2007 10:45 PM |