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

相关推荐
绵羊20233 小时前
单细胞转录组测序上游——cellranger
linux
李子红了时5 小时前
【墨铺网教程】一台电脑加入多个局域网,让电脑做上传下载主力又当存储盘
运维·服务器·电脑
Awkwardx6 小时前
Linux系统编程—线程同步与互斥
linux·服务器
赖small强7 小时前
[Linux]内核队列实现详解
linux·kfifo·请求队列·工作队列(workqueue)·等待队列·kfifo_init
NewCarRen7 小时前
整合STPA、ISO 26262与SOTIF的自动驾驶安全需求推导与验证
人工智能·安全·自动驾驶·预期功能安全
芯盾时代8 小时前
低空经济网络安全体系
安全·web安全
鹿鸣天涯8 小时前
关于进一步做好网络安全等级保护有关工作的问题释疑-【二级以上系统重新备案】、【备案证明有效期三年】
网络·安全·web安全
00后程序员张8 小时前
如何提高 IPA 安全性 多工具组合打造可复用的 iOS 加固与反编译防护体系(IPA 安全 iOS 加固 无源码混淆 Ipa Guard 实战)
android·安全·ios·小程序·uni-app·iphone·webview
小妖同学学AI8 小时前
Rust 深度解析:变量、可变性与所有权的“安全边界”
开发语言·安全·rust
www.028 小时前
linux服务器升级显卡驱动(笔记)
linux·运维·服务器·笔记·ubuntu·服务器环境