Linux How to..

Linux How to ,Share Knowledge

TAG : command netstat check active connection status : ESTABLISHED , SYN_RECV

ตรวจสอบว่ามีคนส่ง syn เข้ามาเพื่อขอติดต่อแต่ละ ip เป็นจำนวนเท่าไหร่ หากเกิน 10 ก็ให้ทำการ block ได้เลย
# netstat -ntu | grep SYN_RECV | awk “{print $5}” | cut -d: -f1 | sort | uniq -c | sort -nr
ตรวจสอบว่าแต่ละ ip connect server กี่ connection ไม่ควรเกิน 10-20 connection ต่อ ip
# netstat -ntu | grep ESTABLISHED | awk “{print $5}” | cut -d: -f1

 

Comments are closed.