psad 透過 iptables 的 log 訊息,使用 snort 的特徵來偵測 port scan 及分析一些可疑的封包.

psad 是用 perl 語言寫的

官網: http://cipherdyne.org/psad/index.html

下載點: http://cipherdyne.org/psad/download/

1) 下載

wget http://cipherdyne.org/psad/download/psad-2.1.4.tar.gz

2) 安裝

tar zxvf psad-2.1.4.tar.gz

cd psad-2.1.4

./install.pl

↑↑↑ 跟著提示作

3) 啟動

/etc/init.d/psad start

4) 設定 iptables

簡單的規則

iptables -A INPUT -j LOG
iptables -A FORWARD -j LOG

複雜一點的就可作一些變化

iptables -I INPUT 1 -i eth0 -p tcp –dport ! 22 -j LOG –log-prefix “Inbound: ”
iptables -I INPUT 2 -i eth0 -p udp -j LOG –log-prefix “Inbound: ”
iptables -I INPUT 3 -i eth0 -p icmp -j LOG –log-prefix “Inbound: “

5) 查看狀態

service psad status

http://cipherdyne.org/psad/docs/
http://www.howtoforge.com/psad-port-scan-attack-detector-on-engarde-secure-linux

Related posts 相關文章
ipset 是什麼,算是 iptables 的管理工具
More...
使用 iptables 的 hex string 阻擋攻擊
More...
Centos7 服務無法啟動 enable or restart failed
More...
APF = Advanced Policy Firewall 底層是 iptables 的防火牆工具
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。