seasonsstory

[root@localhost ~]# cat /etc/hosts.allow
#
# hosts.allow   This file contains access rules which are used to
#               allow or deny connections to network services that
#               either use the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               See \'man 5 hosts_options\' and \'man 5 hosts_access\'
#               for information on rule syntax.
#               See \'man tcpd\' for information on tcp_wrappers
#
sshd:192.168.27.39/255.255.255.0:allow

[root@localhost ~]# cat /etc/hosts.deny
#
# hosts.deny    This file contains access rules which are used to
#               deny connections to network services that either use
#               the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               The rules in this file can also be set up in
#               /etc/hosts.allow with a \'deny\' option instead.
#
#               See \'man 5 hosts_options\' and \'man 5 hosts_access\'
#               for information on rule syntax.
#               See \'man tcpd\' for information on tcp_wrappers
#

这样就只能从192.168.27.39这台机器登陆服务器了。
sshd:ALL:deny

分类:

技术点:

相关文章: