hosts.allow和hosts.deny配置

有个单机环境限制ssh登录,有多种方式,这里选择了配置hosts.allow和hosts.deny

root@db \~\]# more /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:172.100.100.56:allow sshd:172.100.100.57:allow sshd:172.100.100.42:allow sshd:172.100.100.43:allow sshd:172.100.100.46:allow \[root@db \~\]# 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 # sshd:all:deny \[root@db \~\]#

相关推荐
航Hang*18 分钟前
Windows Server 配置与管理——第3章:文件系统管理
运维·服务器·windows·vmware
黎阳之光37 分钟前
黎阳之光:视频孪生领跑者,铸就中国数字科技全球竞争力
大数据·人工智能·算法·安全·数字孪生
lifewange43 分钟前
Linux ps 进程查看命令详解
linux·运维·服务器
上海云盾-高防顾问44 分钟前
网络安全防护发展趋势:从被动防御到主动赋能
安全·web安全
功德+n1 小时前
Linux下安装与配置Docker完整详细步骤
linux·运维·服务器·开发语言·docker·centos
CCTI_Curran1 小时前
UL4200A是美国针对纽扣电池安全标准
安全·纽扣电池·ul4200a·纽扣电池gcc认证·美国亚马逊
做个文艺程序员1 小时前
MySQL安全加固十大硬核操作
数据库·mysql·安全
是罐装可乐1 小时前
深入理解“句柄(Handle)“:从浏览器安全到文件系统访问
前端·javascript·安全
人工干智能1 小时前
科普:python中你写的模块找不到了——`ModuleNotFoundError`
服务器·python