如何在psad中启用特定地址(或范围)的端口扫描?
默认情况下,我从我自己的监控服务获得大量日志。 我怎么能告诉psad把我的地址或域名视为可信任的?
我想避免将它们添加到/etc/hosts.allow文件。
以下是示例日志文件消息:
Scanned UDP ports: [36604-53945: 3 packets, Nmap: -sU] iptables chain: INPUT, 3 packets Source: abc200 DNS: ns3-cache.example.com Destination: abc185 DNS: my.machine.example.com
要将IP或范围列入白名单,请使用/etc/psad/auto_dl文件:
它有示例显示其function:
# <IP address> <danger level> <optional protocol>/<optional ports>; # # Examples: # # 10.111.21.23 5; # Very bad IP. # 127.0.0.1 0; # Ignore this IP. # 10.10.1.0/24 0; # Ignore traffic from this entire class C. # 192.168.10.4 3 tcp; # Assign danger level 3 if protocol is tcp. # 10.10.1.0/24 3 tcp/1-1024; # Danger level 3 for tcp port range
您需要Ignoretypes的规则,因为它将danger level设置为零,有效地忽略该IP /范围。