使用TCP Wrappers增强SSHD安全性

简介:

TCP Wrappers是一个基于主机的ACL系统,他被用来过滤对Linux系统提供的网络服务的访问。他通过libwrap向daemon进程提供过滤功能。

使用TCP Wrappers增强SSHD安全性

TCP Wrappers的工作流程:

1、读取/etc/hosts.allow文件,如果能匹配到策略,则允许;否则进行下一步;

2、读取/etc/hosts.deny 文件,如果能匹配到策略,则拒绝;否则允许。

实例:只允许192.168.0.100/24访问。

# cat /etc/hosts.allow

sshd:192.168.0.100/255.255.255.0

# cat /etc/hosts.deny

sshd:All