hosts.allow和hosts.deny规则的执行者为TCP wrappers,对应守护进程为tcpd;而tcpd执行依赖于程序使用了libwrap库。

查看程序是否使用libwarp

strings /usr/sbin/sshd | grep hosts_access
ldd /usr/sbin/sshd | grep libwrap

hosts.allow

sshd:192.168.1.2:allow

hosts.deny

sshd:ALL

相关文章: