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

相关推荐
李白你好3 小时前
TongWeb EJB 反序列化生成工具(Java-Chain 插件)
java·安全
浅时光_c3 小时前
3 shell脚本编程
linux·开发语言·bash
Lucis__4 小时前
一文读懂TCP通信机制:基于相关API构建可靠性连接
linux·网络·tcp/ip
_深海凉_4 小时前
LeetCode热题100-有效的括号
linux·算法·leetcode
数据库小组4 小时前
MySQL 删库后怎么恢复?binlog2sql 之外,NineData 还能做什么
数据库·sql·mysql·安全·数据·ninedata·删库
PinTrust SSL证书5 小时前
IP地址访问网站,怎么去除不安全提示?
网络协议·tcp/ip·安全·网络安全·https·ssl
鹿鸣天涯5 小时前
Xftp传输文件时,解决“无法显示远程文件夹”方法
运维·服务器·计算机
unDl IONA6 小时前
服务器部署,用 nginx 部署后页面刷新 404 问题,宝塔面板修改(修改 nginx.conf 配置文件)
运维·服务器·nginx
零号全栈寒江独钓6 小时前
基于c/c++实现linux/windows跨平台获取ntp网络时间戳
linux·c语言·c++·windows
Web极客码6 小时前
WordPress管理员角色详解及注意事项
运维·服务器·wordpress