Deprecate TCP wrappers
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.
- Name: Jakub Jelen
- Email: firstname.lastname@example.org
- Release notes owner:
- Targeted release: Fedora 28
- Last updated: 2017-09-05
- Tracker bug: <will be assigned by the Wrangler>
Last version of tcp_wrappers was released 20 years ago (with later addition of IPv6 support). 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" or similar filtering exists in most of the applications.
One of the impulses for this change was removal of TCP wrappers support from systemd and openssh in 2014, based on the thread on fedora devel list . I started another thread during 2017  which is trying to explain the reasons why we should do that with other constructive ideas.
Benefit to Fedora
Removing this package from Fedora will remove a package from default and minimal installations (removing dependency of daemons such as SSHD). It also makes the configuration straight-forward for new users (no shared files defining access rules, poorly reporting any errors to users.
Removing the dependency from all packages and retiring the package in single release will minimize users confusion and avoids opening sensitive services after the update.
- Proposal owners: Deprecate tcp_wrappers in Fedora, remove dependency on other pacakges maintained and notify other maintainers to follow the same procedure.
- Other developers: Remove dependency of your software on tcp_wrappers
- Release engineering: TODO #Releng issue number (a check of an impact with Release Engineering is needed)
- List of deliverables: TODO N/A (not a System Wide Change)
- Policies and guidelines: If package will not be retired, update packaging guidelines to NOT RECOMMEND building against tcp_wrappers
- Trademark approval: N/A (not needed for this Change)
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 (firewald, application configuration) if this was the only one they used.
How To Test
You should be able to run system (for example with OpenSSH) without tcp_wrappers package.
Users should not notice any difference. System administrators will have to configure different layer of security, if tcp_wrapper was the only one they relied on.
Other packages should be rebuilt without support for tcp_wrappers (if possible). That should be at most tens lines of code change, configure option (if upstream still supports it) or dropping downstream patch.
- Contingency mechanism: tcp_wrappers package will not be retired, offending packages will still carry this dependency, but guidelines should be updated to not recommend building against this package
- Contingency deadline: Beta freeze?
- Blocks release? No
After removing the libwrap dependency from the openssh, it will stop using rules defines in
/etc/hosts.deny. The functionality can be added back to any socket-activated service. For example SSHD:
systemctl disable sshd
- Copy the shipped
- Modify the
ExecStartline in the above file under
ExecStart=-/usr/sbin/sshd -i $OPTIONS $CRYPTO_POLICY
ExecStart=@-/usr/sbin/tcpd /usr/sbin/sshd -i $OPTIONS $CRYPTO_POLICY
- Enable and start
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 .
Similar approach can be used for other services, that will drop tcp_wrappers dependency.
Fedora 28 removes support for tcp_wrappers (aka
/etc/hosts.deny access files). The preferred replacement is software firewalld/nftables rules or software specific access rules for more complex filtering. If your system security depends on tcp_wrappers rules, convert them to firewall, or set up
tcpd to do the same job for you.