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

相关推荐
王大傻092831 分钟前
CSRF漏洞概述
安全·web安全·csrf
网云工程师手记33 分钟前
DDNS-Go部署与使用体验:动态公网IP远程访问不再断
运维·服务器·网络·网络协议·网络安全
HalvmånEver40 分钟前
Linux:基于信号量的环形队列与生产者消费者模型(一)
linux·运维·服务器·信号量
威桑2 小时前
解决 Qt6 程序 在Linux 环境下无法输入中文的问题
linux·c++·qt
j_xxx404_2 小时前
Linux:文件描述符fd
linux·运维·服务器
未既2 小时前
逻辑卷挂载磁盘操作命令
linux·运维·服务器
xixixi777772 小时前
零样本学习 (Zero-Shot Learning, ZSL)补充
人工智能·学习·安全·ai·零样本·模型训练·训练
那就回到过去3 小时前
拥塞管理和拥塞避免
运维·服务器·网络·网络协议·tcp/ip·ensp
李斯维3 小时前
安装 Arch Linux 到 VMware Workstation 的完全指南
linux
未来之窗软件服务3 小时前
服务器运维(三十六)日志分析nginx日志工具—东方仙盟
运维·服务器·服务器运维·仙盟创梦ide·东方仙盟