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 \~\]#

相关推荐
盛满暮色 风止何安4 小时前
IS-IS 中间系统到中间系统
服务器·网络·网络协议·安全·web安全·网络安全·智能路由器
智驱力人工智能4 小时前
AI移动监测:仓储环境安全的“全天候守护者”
人工智能·算法·安全·边缘计算·行为识别·移动监测·动物检测
日出等日落5 小时前
本地部署Immich系统结合Cpolar技术实现安全跨设备影像管理方案
安全
斯普信专业组5 小时前
Apidog MCP服务器,连接API规范和AI编码助手的桥梁
运维·服务器·人工智能
wayuncn5 小时前
深度解析物理机服务器故障修复时间:影响因素与优化策略
运维·服务器·物理机·服务器租用·服务器托管·物理服务器·哈尔滨idc
一人一萧十只猫�5 小时前
Linux SSH 远程连接全攻略:从加密原理到实战配置(含图解)
linux·服务器·网络
人间不清醒ab5 小时前
Ubuntu ping网络没有问题,但是浏览器无法访问到网络
linux·运维·ubuntu
AWS官方合作商5 小时前
AWS CloudHSM:金融级密钥安全管理实战,如何通过FIPS 140-2认证守护数据生命线?
安全·金融·aws
babytiger5 小时前
为 Windows 和 Ubuntu 中设定代理服务器的详细方法
linux·windows·ubuntu
默心5 小时前
centos把jar包配置成服务并设置开机自启
linux·centos·jar