两个配置文件: /etc/hosts.allow /etc/hosts.deny
1. 如果权限冲突,默认系统是从allow ,deny 文件检查
2.EXCEPT 表示除了什么之外的主机
3. 一般出于安全考虑,可以将deny 文件中某个服务设置成ALL,然后在allow文件中添加权限
例如:
vi /etc/hosts.deny
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
sshd: 192.168.1.100 EXCEPT 192.168.1.116
in.telnetd : 192.168.1.0/255.255.255.0
