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

相关推荐
sanzk20 小时前
firefly开发板ubuntu安装ros2下的micro-ROS Agent
linux·运维·ubuntu
@insist12321 小时前
系统规划与管理师-信息安全规划核心考点解析:概述与安全架构
安全·软考·安全架构·系统规划与管理师·软件水平考试·系统规划与管理工程师
IT小白杨21 小时前
从移动指纹到App隔离:TikTok Shop跨境电商账号安全管理实战
安全·新媒体运营·业界资讯·指纹浏览器
humors2211 天前
【分享】火绒恶意网址自定义规则,根据互联网应急中心部分威胁预警恶意代码制作
网络·安全·规则·火绒安全·恶意网址·应急中心
工程管理笔记1 天前
工程发票与资金管理系统:蓝燕云进销项发票台账功能
安全
weixin_307779131 天前
Linux下Nginx故障系统化检查Shell脚本
linux·运维·服务器·nginx·自动化
skyutuzz1 天前
node安装部署
linux
一次旅行1 天前
【AI工具】Rust-Based CLI:用 xargs 和并行加速你的 Linux 日常
linux·开发语言·rust
山峰哥1 天前
数据库工程与索引策略实战指南‌
服务器·数据库·sql·oracle·深度优先
爱折腾的小黑牛1 天前
礼账小程序的数据安全方案:加密与备份
数据库·安全