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

相关推荐
小则又沐风a4 分钟前
list模拟实现
java·服务器·list
拾光Ծ11 分钟前
【Linux系统】进程信号(上)
linux·运维·服务器·面试·信号处理
咖喱o12 分钟前
网络-堆叠
linux·运维·服务器·网络
Aision_17 分钟前
为什么 CTI 场景需要知识图谱?
人工智能·python·安全·web安全·langchain·prompt·知识图谱
Java面试题总结18 分钟前
一文搞定 Linux Nginx 从安装、启动到 nginx.conf 全配置详解(新手也能看懂)
linux·运维·nginx
clear sky .21 分钟前
【TCP】TCP数据粘包/分包问题
java·服务器·网络
齐齐大魔王7 小时前
linux-僵死进程处理
linux·运维·服务器
wuminyu10 小时前
专家视角看Java字节码加载与存储指令机制
java·linux·c语言·jvm·c++
其实防守也摸鱼10 小时前
CTF密码学综合教学指南--第五章
开发语言·网络·笔记·python·安全·网络安全·密码学
.小小陈.10 小时前
Linux 线程概念与控制:从底层原理到实战应用
linux·运维·jvm