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

相关推荐
白山云北诗10 分钟前
深度解读云防火墙(WAF):守护网络安全的智能卫士
安全·web安全·防火墙·waf·云防火墙·web应用防火墙
douluo9981 小时前
老飞飞bug及原理修复方法
安全·web安全
早起鸟儿1 小时前
docker-Dockerfile 配置
java·linux·运维·docker
tiantianuser2 小时前
RDMA简介7之RoCE v2可靠传输
服务器·fpga开发·verilog·xilinx·rdma·可编程逻辑
忘川w3 小时前
《网络安全与防护》知识点复习
笔记·安全·web安全·网络安全
国际云,接待4 小时前
微软云注册被阻止怎么解决?
服务器·网络·microsoft·云原生·微软·云计算
love530love4 小时前
是否需要预先安装 CUDA Toolkit?——按使用场景分级推荐及进阶说明
linux·运维·前端·人工智能·windows·后端·nlp
银空飞羽4 小时前
总结一下最近学习到的MCP风险问题(杂谈)
安全·mcp·trae
m0_694845575 小时前
日本云服务器租用多少钱合适
linux·运维·服务器·安全·云计算
一心0925 小时前
Linux部署bmc TrueSight 监控agent步骤
linux·运维·服务器·监控·bmc truesight