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

Installing an IP address filter ... ??? #244

Closed
TheHippoMan opened this issue Aug 4, 2023 · 2 comments
Closed

Installing an IP address filter ... ??? #244

TheHippoMan opened this issue Aug 4, 2023 · 2 comments

Comments

@TheHippoMan
Copy link

TheHippoMan commented Aug 4, 2023

[perhaps a feature request]
I'm wondering whether anyone has written any add-on code for dropbear which can filter connections by incoming IP address.

I know that I can do this via iptables or ufw, but for various reasons (long story), neither of those is an option on my current debian host.

I'd like to somehow supply a list of IP addresses to the dropbear server, and if any incoming connection originates from any of those listed IP addresses, I'd like to cause dropbear to simply drop the connection.

I know this requires coding, and I'm willing to dive in and do this coding by myself, if necessary. But if someone has already written something like this, I'd prefer not to "re-invent the wheel".

Does anyone know of any such add-on code that might already have been written?

Thank you in advance for any thoughts or ideas.

@needless
Copy link

needless commented Sep 22, 2023

Without coding, the easiest for you would be to use iproute2. Something like shown in example below will work out for your node:
ip route add blackhole 192.0.2.0/24

Blocking IP addressess is not something dropbear should take care of, out of scope. Blocking IP's is better dealt by using external tools, either by those listed in your post, or iproute2, or whatever tool.

@mkj
Copy link
Owner

mkj commented Sep 22, 2023

Another option would be tcpwrappers using Dropbear in inetd mode.

@mkj mkj closed this as completed Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants