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

相关推荐
ShineWinsu1 小时前
对于Qt:TCP的解析
linux·c++·qt·网络协议·面试·tcp·客户端
笔记本note2 小时前
Linux GPIO 技术详解
linux·gpio
东坡大表哥3 小时前
【Ubuntu】Ubuntu 20.04 LTS → 22.04 LTS 升级实录
android·linux·ubuntu
LabVIEW开发4 小时前
EXFO IQS-5100B + LabVIEW 光测试怎么做?
服务器·网络·labview
进击的荆棘5 小时前
Linux网络——应用层协议HTTP
linux·运维·服务器·网络·http
迪康软件zz5 小时前
敏感文件判定引擎:从单词命中到加权打分
运维·安全·自动化运维
雪球数智6 小时前
IoT 行业情报周报|市场动态、技术趋势与产业洞察(第八期)
网络·物联网·安全·智能家居·iot
jipinxiaofeihua6 小时前
(文章7) 04章-C++异常处理(下)
linux·运维·网络
cpolar技术支持7 小时前
rsync 只看「大小 + 修改时间」:源文件改成 `CCCC-v3`、目标还是 `DDDD-v4`,三条同步命令 rc 全是 0
linux·rsync·cpolar·nas·数据同步
持敬chijing14 小时前
域渗透2-PTH (攻击学习笔记)
安全·网络安全·系统安全·网络攻击模型·安全威胁分析