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

相关推荐
扛枪的书生9 分钟前
Nginx 学习总结
linux
曹牧43 分钟前
JSON 数组的正确使用方式
java·服务器·前端
石头猫灯1 小时前
DNS 服务器配置实验
运维·服务器
认真的薛薛1 小时前
Docker网络模式
linux·运维·数据库·面试·github
Echo-J1 小时前
KVM-VMI项目编译安装全过程,包含所遇问题及解决措施
安全·网络安全·云计算·系统安全
民乐团扒谱机1 小时前
【读论文】Frequency Comb Based Optical Time Transfer基于光频梳的光时间传递
运维·服务器
UP_Continue1 小时前
Linux--日志的模拟实现
linux·运维·服务器
xlp666hub1 小时前
深度剖析Linux Input子系统(1):宏观架构与核心原理
linux
小金鱼Y1 小时前
🔥 前端人必看:浏览器安全核心知识点全解析(XSS/CSRF/DDoS)
前端·javascript·安全
东北甜妹2 小时前
playbook
linux·服务器·网络