Posted on December 29th, 2006 by Alex P..
Categories: Server Security.
Greetings,
If you want to block access to your server for whatever reason, you will need to log into the shell as root. Your server should either have ipchains or iptables to help accomplish this.
In this example, the attacking IP is 192.168.56.210 .
If you are using ipchains, type “ipchains -A input -j DENY -p all -l -s 192.168.56.210/32″
If you are using iptables, type “iptables -A INPUT -s 192.168.56.210/32 -j DROP”
If you just want to block access to one port from an ip :
iptables -A INPUT -s 192.168.56.210/32 -p tcp –destination-port 23 -j DROP
The above would drop all packets from 192.168.56.210/32 to port 23 (telnet) on the server.
Alex P.
0 comments.
Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.