Live data from Hacker News

Block web scanners with ipset and iptables

nbailey.ca

31–40 of 46 posts

Re: Block web scanners with ipset and iptables

#31

Not to detract from the article, but we should be using nftables in 2022. :-) https://wiki.nftables.org/wiki-nftables/index.php/Moving_fro...

He probably is in a way. iptables is now just a wrapper around nftables and nftables understand the iptables syntax.

Where is that wrapper? In user space or in the kernel?

Re: Block web scanners with ipset and iptables

#32

ipset requires a separate kernel module.

ipfilter requires seperate kernel modules for various options. On most common distros they have been built and installed by default and will just be loaded at runtime I'd assume. If you run a highly customized kernel you probably have had the issue before when doing something with the firewall.

Re: Block web scanners with ipset and iptables

#33

Not to detract from the article, but we should be using nftables in 2022. :-) https://wiki.nftables.org/wiki-nftables/index.php/Moving_fro...

He probably is in a way. iptables is now just a wrapper around nftables and nftables understand the iptables syntax.

I always feel like a git telling people "it's nftables now!", but it's been over a decade and folks keep using iptables as the common identifier. It's slow to change language. You're right, many of those iptables commands are utilities/scripts around nftables now.

Re: Block web scanners with ipset and iptables

#36
post #16

I've been using fail2ban to kill this for years. Seems to be quite effective: https://github.com/fail2ban/fail2ban

If possible, report the hosts you block using f2b to AbuseIPDB or similar projects. That way we'd be collectively better able to hinder this abuse.

There's crowdsec to share info about IP in a collaborative way: https://www.crowdsec.net/

Re: Block web scanners with ipset and iptables

#37
post #31

Earlier quoted context omitted.

He probably is in a way. iptables is now just a wrapper around nftables and nftables understand the iptables syntax.

Where is that wrapper? In user space or in the kernel?

aiui the iptables-nft wrapper is userspace, it translates iptables syntax into nftables and applies those nftables rules.

Re: Block web scanners with ipset and iptables

#38

Not to detract from the article, but we should be using nftables in 2022. :-) https://wiki.nftables.org/wiki-nftables/index.php/Moving_fro...

He probably is in a way. iptables is now just a wrapper around nftables and nftables understand the iptables syntax.

If you've set up your rules from scratch using nftables then they are not compatible.

Re: Block web scanners with ipset and iptables

#39

Earlier quoted context omitted.

He probably is in a way. iptables is now just a wrapper around nftables and nftables understand the iptables syntax.

I always feel like a git telling people "it's nftables now!", but it's been over a decade and folks keep using iptables as the common identifier. It's slow to change language. You're right, many of those iptables commands are utilities/scripts around nftables now.

Thi is snot very much different from "use IPv6".

I work in IT and it is now probably 25 years that I keep hearing that IPv6 is round the corner. "Adoption" is ~35% but what this means that in 35% of the cases, you can get to a place though IPv6. This does not mean that you must, or do. It is just the capacity.

When a technology takes 25 or so years to be mainstream it means that there is a problem somewhere ("too complicated", ...) or that there is no problem in the forst place ("iptables work fine for me", "I NAT my 10.x network", ...)

Re: Block web scanners with ipset and iptables

#40
post #6

On my internet facing hosts, I use the firehol level 2 and level 3 block sets along with blocking all CN IP space that I can accurately identify. My logs are eerily quiet.

I tried firehol for some time and quite liked it (much more than iptables). This was after shorewall started to fade out (and is now abandoned or so).

I had some problems to get community support and it seems that activity around firehol is fading away and I am not sure whether this is because this is a complete, finished product, or because it is abandoned.

Post reply on HN