Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP Wrappers or IP address filtering? #183

Open
pataquets opened this issue Jun 9, 2017 · 6 comments
Open

TCP Wrappers or IP address filtering? #183

pataquets opened this issue Jun 9, 2017 · 6 comments

Comments

@pataquets
Copy link

I would like to have some sort of mechanism to filter/drop connections based on black/white lists.
I'm fine (actually I prefer) with being able to do it via TCP Wrappers, since I understand it could not be considered a 'core' feature.
I've followed http://www.ducea.com/2006/07/02/how-to-find-out-if-a-daemon-was-build-with-tcp-wrappers-support-hostsallowhostsdeny/ and looks like it's not linked.

@pataquets
Copy link
Author

Bump. Is it possible?

@gquintard
Copy link
Contributor

gquintard commented Jul 6, 2017 via email

@pataquets
Copy link
Author

Thanks @gquintard. I could not find any reference to ACL in the docs. If you mean ACL'ing IPs in the backend, it sounds suboptimal to me, since there would be wasted resources on negotiating TLS for a droppable connection.
Anyway, TCP Wrappers are a quite extended and standard way of connection filtering. They are simpler and easier to maintain than firewalls, too.
Do linking Hitch against libtcpwrap makes sense? I can not fully understand the implications of it and perhaps it is nonsense or perhaps it can be a compile time option.

@gquintard
Copy link
Contributor

Apologies, I thought it was a varnish discussion. I'll let @daghf reply regarding the potential of using tcpwrappers.

Why not "simply" use iptables?

@pataquets
Copy link
Author

In general:

  • Using iptables is harder (IMO) and dangerous
  • Less portable, due to different firewalls and versions
  • Messes with firewalls (global system/network level), instead of being app-level. This might not be always possible.

In my specific case, it allows me to package the software + the configured IPs inside a Docker container and deploy it without anything else needed from the host system (last bullet point above).

@fourjay
Copy link

fourjay commented Dec 5, 2019

To add to pataquets list, tcp-wrappers is much easier to implement large lists with, such as the ones provided by global filtering lists like badips.com. There are firewall methods to incorporate these lists, but they typically depend on ipset. iptables alone is simply not optimized for large lists of IP addresses (and even ipset takes a long time to build its lists).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants