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

相关推荐
二川bro2 分钟前
第54节:安全防护 - 3D场景中的XSS防御
安全·3d·xss
☼←安于亥时→❦1 小时前
Linux 系统日志‘/var/log/syslog‘ 和 ‘/var/log/messages‘ 详解
linux
袁气满满~_~1 小时前
Ubuntu下配置PyTorch
linux·pytorch·ubuntu
倦王1 小时前
Linux看ip,改用户名字加权限,在单独用户下设置miniconda
linux·服务器·tcp/ip
少废话h1 小时前
Flume Kafka源与汇的topic覆盖问题解决
java·linux·kafka·flume
qq_2153978972 小时前
docker 管理工具 Portainer安装
运维·服务器·docker
凤凰战士芭比Q2 小时前
Docker安装与常用命令
linux·运维·docker·容器
华哥啊.2 小时前
服务器安装node_exporter监测cpu以及内存相关情况
运维·服务器
ASKED_20192 小时前
常用 Linux 命令大全(文件、网络、时间、进程、数据库、工具全覆盖)
linux·网络·数据库
yuejich2 小时前
命名规范snake_case
服务器·前端·数据库