[[email protected] ~]# 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: ALL ← 添加这一行,屏蔽来自所有的SSH连接请求
[[email protected] ~]# vi /etc/hosts.allow ← 修改允许规则,在文尾添加相应行
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the ‘/usr/sbin/tcpd’ server.
#