Wednesday, December 19, 2012

0 Block the ip address on the linux

Recently, I have the need to block the ip address on the Linux host, here are some notes.

route command require root privilege.

List active connection

netstat -tcp --numeric 

image

Check current routing table

/sbin/route -n
image

 

Reject ip using routing table

/sbin/route add -host 192.168.56.1 reject
image

Remove the rule from routing table

/sbin/route del -host 192.168.56.1 reject

image

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates