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

相关推荐
岁月玲珑21 小时前
ComfyUI如何配置启动跳转地址127.0.0.1但是监听地址是0.0.0.0,::
java·服务器·前端
迅为电子21 小时前
嵌入式Linux新手入门:北京迅为3568开发板驱动开发第二章helloworld 驱动实验
linux·运维·驱动开发
2301_796512521 天前
Rust编程学习 - 如何学习有关函数和闭包的高级特性,这包括函数指针以及返回闭包
服务器·学习·rust
哈乐1 天前
网工应用题:配置命令补全类题目
服务器·前端·网络
张人玉1 天前
C# TCP 服务器和客户端
服务器·tcp/ip·c#
雯0609~1 天前
宝塔配置:IP文件配置,根据端口配置多个项目文件(不配置域名的情况)
服务器·网络协议·tcp/ip
河南博为智能科技有限公司1 天前
RS485转以太网串口服务器-串口设备联网的理想选择
大数据·服务器·人工智能·单片机·嵌入式硬件·物联网
JanelSirry1 天前
Redis服务器的的内存是多大
服务器·redis·github
国科安芯1 天前
抗辐照MCU芯片在无人叉车领域的性能评估与选型建议
网络·人工智能·单片机·嵌入式硬件·安全
xixixi777771 天前
水坑攻击的攻击原理和特点+案例和防御方法
网络·安全·web安全