Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Block An IP Address 2

Status
Not open for further replies.

iaresean

Programmer
Joined
Mar 24, 2003
Messages
570
Location
ZA
Hello All;

Does anyone out there know how to block a specific ip address? I don't want a specific computer to be able to gain access in any form to mine.

Thank you for any and all help.

Sean. [peace]
 
Red Hat 9 - Gnome GUI

Sean. [peace]
 
If you want a specific computer to be unable to communicate with your machine, then add an entry to the filtering tables using the iptables command:

iptables -A INPUT --source <ip address here> -j DROP

This command appends a command to the INPUT table. If the source IP address of any packet matches the IP address in the command, the kernel will simply drop the packet.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks alot!

How would I unblock the ip again though? (Just in case :-) )

Thanks alot again!

Sean. [peace]
 
And what about man iptables ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks.

Your kind direction towards the man page solved my question.

Sean. [peace]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top