为什么tcp-wrappers被Redhat Centos Fedora废弃?
1 简述
TCP wrappers is a simple tool to block incoming connection on application level. This was very useful 20 years ago, when there were no firewalls in Linux. This is not the case for today and connection filtering should be done in network level or completely in application scope if it makes sense. After recent discussions I believe it is time to go for this package, if not completely, than at least as a dependency of modern daemons in system by default.
2 详细描述
The last version of tcp_wrappers was released 20 years ago (although IPv6 support was added later). At that time it was very powerful tool to "block all traffic", but these days we can do the same thing using firewalls/iptables/nftables for all traffic on network level or use similar filtering at the application level.
One of the motivating factors for this change was the removal of TCP wrappers support from systemd and OpenSSH in 2014, based on the thread on fedora devel list [1]. Another thread was started during 2017 [2] which is trying to explain the reasons why we should do that with other constructive ideas.
Another factor which has driven the deprecation of this package is the lack of any upstream community around it. Although the threats on networking communications continually increase, the threat coverage of this package has remained the same over the last two decades, leading one to draw the inference that new threats are now being handled by different components.
3 升级影响
Updating from older versions might expose existing services "protected" by tcp_wrappers before (sshd). The removal needs to be explicitly mentioned in the migration guide/release notes so the users are able to configure different layer of security (firewalld, application configuration) if this was the only one they used.
4 替代方案
After removing the libwrap dependency from openssh, it will stop using rules defines in /etc/hosts.deny. The functionality can be "added back" if needed to any socket-activated service. For example SSHD:
- Disable
sshd.service
systemctl disable sshd
- Copy the shipped
sshd@.serviceto/etc:
cp {/usr/lib,/etc}/systemd/system/sshd@.service
- Modify the
ExecStartline in the above file under/etc/from
ExecStart=-/usr/sbin/sshd -i $OPTIONS $CRYPTO_POLICY
to
ExecStart=@-/usr/sbin/tcpd /usr/sbin/sshd -i $OPTIONS $CRYPTO_POLICY
- Reload
systemctl
systemctl daemon-reload
- Enable and start
sshd.socket
systemctl enable sshd.socket
systemctl start sshd.socket
- Verify that you can connect to new service (not working now, because it is blocked by SELinux). Blocked by the bug #1482554 [3].
A similar approach can be used for other services to drop the tcp_wrappers dependency.
参考链接:
https://fedoraproject.org/wiki/Changes/Deprecate_TCP_wrappers
https://serverfault.com/questions/869431/openssh-removed-support-for-tcp-wrappers-now-what-no-hosts-allow-for-ssh-acce
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UOAUI4TC6PQVHRJ2ONQ2N3IKHR4577VH/ 废弃后如何实现原有功能
为什么tcp-wrappers被Redhat Centos Fedora废弃?的更多相关文章
- Fedora Redhat Centos 有什么区别和关系?
Fedora Redhat Centos 有什么区别和关系? 经常看到有人讨论服务器的操作系统,比如 Readhat 和 Centos,还有 Ubuntu Server. 可能 Ubuntu Serv ...
- CentOS 访问控制列表(tcp wrappers)
1.TCP Wrappers是一个工作在应用层的安全工具,它只能针对某些具体的应用或者服务起到一定的防护作用.比如说ssh.telnet.FTP等服务的请求,都会先受到TCP Wrappers的拦截. ...
- 在RedHat/CentOS下安装Docker(不升级内核)
由于内核版本问题,最初仅Ubuntu可以较好的支持Docker.不过,由于RedHat系列OS(REHL.CentOS)是目前主流的Linux服务器操作系统,所以令RedHat系列OS支持Docker ...
- RHEL/CentOS/Fedora各种源(EPEL、Remi、RPMForge、RPMFusion)配置
最新文章:Virson’s Blog CentOS默认自带CentOS-Base.repo源,但官方源中去除了很多有版权争议的软件,而且安装的软件也不是最新的稳定版.Fedora自带的源中也找不到很多 ...
- Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux
Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux¶ Overview Use this tutorial t ...
- RHEL/CentOS/Fedora常用的 CentOS 5/6/7 yum 源(EPEL、Remi、RPMForge、RPMFusion, ius,163,sohu,阿里云)配置
RHEL以及他的衍生发行版如CentOS.Scientific Linux为了稳定,官方的rpm repository提供的rpm包往往是很滞后的,当然了,这样做这是无可厚非的,毕竟这是服务器版本,安 ...
- Linux下载_Linux系统各种版本ISO镜像下载(redhat,centos,oracle,ubuntu,openSUSE)
以下是风哥收集的Linux系统各种版本ISO镜像下载,包括redhat,centos,oracle,ubuntu等linux操作系统. Linux下载1:红帽RedHat Linux(RHEL5.RH ...
- RHEL/CentOS/Fedora各种源
CentOS 默认自带 CentOS-Base.repo 源, 但官方源中去除了很多有版权争议的软件, 而且安装的软件也不是最新的稳定版. Fedora 自带的源中也找不到很多多媒体软件, 如果需要安 ...
- Docker运行操作系统环境(BusyBox&Alpine&Debian/Ubuntu&CentOS/Fedora)
目前常用的Linux发行版主要包括Debian/Ubuntu系列和CentOS/Fedora系列.前者以自带软件包版本较新而出名:后者则宣称运行更稳定一些.选择哪个操作系统取决于读者的具体需求.同时, ...
随机推荐
- 项目使用Kafka镜像报错处理记录:this server does not host this topic-partition
背景 项目使用docker swarm部署 服务之间使用消息中间件 kafka 通信 Kafka 使用 star 3.7k 的 wurstmeister/kafka:2.12-2.2.1 镜像 Zoo ...
- PHP中redis加锁和解锁的简单实现
背景说明 在程序开发过程中,通常会遇到需要独占式的访问一些资源的情形,比如商品秒杀时扣减库存.这时就需要对资源加锁.实现锁的方式有很多,比如数据库锁.文件锁等等.本文简单介绍PHP中使用redis来实 ...
- vue脚手架安装
1. 脚手架: 如何: 1. 安装脚手架的工具命令: npm i -g @vue/cli 电脑安装完命令后 : 直接创建 vue create 文件夹名字 2. 用命令反 ...
- 【彩彩只能变身队(第七组)】Beta版本
本篇博客包括前期博文汇总.任务墙.团队管理细节与交流细节.代码管理.Beta阶段冲刺.团队总结.用户使用报告.Postmortem报告. 服务器网址:http://47.106.227.154/ 彩彩 ...
- 给定中序和后序遍历,求前序序列(C++递归方式实现)
问题: 输入后序和中序,求中序遍历. 算法: void f2(string &pre,string in, string post) { ) //序列为空结束 return; ; //根节点 ...
- HDU 6686 Rikka with Travels 树的直径
题意:定义两点之间的距离为从一个点到另一个点经过的点数之和(包括这两个点),设二元组(x, y)为两条不相交的路径,一条长度为x,一条长度为y,问二元组(x, y)出现了多少次? 思路:直接上jls的 ...
- 利用jmeter发起java请求调用shell脚本
1.创建maven项目 在pom文件中加入依赖: 2.在路径src/main/java下创建类,如类名shellclass 3. 创建jmet ...
- Java使用文件通道复制文件
两种文件通道复制文件方式的性能比较 import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IO ...
- .NET面试题集锦②
一.前言部分 文中的问题及答案多收集整理自网络,不保证100%准确,还望斟酌采纳. 1.实现产生一个int数组,长度为100,并向其中随机插入1-100,并且不能重复. ]; ArrayList my ...
- Python 中内建属性 __getattribute__
参考自:https://blog.csdn.net/yitiaodashu/article/details/78974596 __getattribute__是属性访问拦截器,就是当这个类的属性被访问 ...