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

相关推荐
Trouvaille ~1 小时前
【Linux】网络编程基础(二):数据封装与网络传输流程
linux·运维·服务器·网络·c++·tcp/ip·通信
上海云盾安全满满2 小时前
什么是端口管理,网络安全的关键环节
安全·web安全
久绊A2 小时前
春节前云平台运维深度巡检-实操经验
运维·安全·容器·kubernetes·云平台
万邦科技Lafite2 小时前
一键获取京东商品评论信息,item_reviewAPI接口指南
java·服务器·数据库·开放api·淘宝开放平台·京东开放平台
旅途中的宽~2 小时前
【深度学习】通过nohup后台运行训练命令后,如何通过日志文件反向查找并终止进程?
linux·深度学习
零域行者2 小时前
PHP反序列化漏洞详解(含靶场实战)
安全·web安全
dump linux3 小时前
内核驱动调试接口与使用方法入门
linux·驱动开发·嵌入式硬件
阿猿收手吧!3 小时前
【C++】volatile与线程安全:核心区别解析
java·c++·安全
Trouvaille ~3 小时前
【Linux】网络编程基础(三):Socket编程预备知识
linux·运维·服务器·网络·c++·socket·网络字节序
德迅云安全—珍珍3 小时前
低配服务器性能不够用怎么去优化?
运维·服务器