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
留言