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

相关推荐
爱装代码的小瓶子7 分钟前
【C++与Linux进阶】详解信号的捕获:内核态和用户态的转换
linux·开发语言·c++
袁小皮皮不皮11 分钟前
【HCIA】第一章网络基础
运维·服务器·网络·网络协议·智能路由器
ascarl201012 分钟前
Kylin V10 服务器,解决Xorg 占用内存很高的问题
服务器·github·kylin
AI周红伟15 分钟前
周红伟:OpenClaw+ 微信+ QQ+云上OpenClaw(Clawdbot)快速接入企业微信指南
运维·服务器·网络
ZStack开发者社区17 分钟前
技术解析:ZStack 计算 + 存储双利旧,破解数据中心异构纳管与资产浪费痛点
服务器·云计算
NewCarRen36 分钟前
车载安全(三):OTA车载软件更新和远程诊断
安全·自动驾驶·汽车
数通工程师38 分钟前
搞定数通设备账号安全:登录审计、紧急踢线、故障排查与配置规范
运维·网络·网络协议·安全·网络安全
ManchiBB39 分钟前
Ubuntu 部署OpenClaw教程
linux·运维·ubuntu
桌面运维家39 分钟前
Linux网络负载均衡:Nginx实战优化Web性能
linux·网络·负载均衡
Nuopiane1 小时前
Pal3.Unity开源项目复刻(八)其余
java·服务器·前端