News for hackers. Stuff that matters.
Re:Who's Attacking My Server? by chockchocschoir on Sunday March 13, 2022 @02:02PM (#30663982)
Before going about a blocking potential people who are in fact interested in your content/service (which you can't know if they are or not based on the country), did you do the bare minimum to secure your server against attackers from any other location, namely changed from the default password and disabled password login?

Your approach to security has a number of issues. First, you don't know if someone is actually interested in your thing or not based on the location. They could be visiting China, could still be able to speak English or any other reason. Secondly, the mapping of Location <> IP Address is not as guaranteed as you seem to think. Plenty of IPs get flagged as Chinese while not being in China, and vice-versa is true as well. Just because some 3rd party says a host/client is in a specific location doesn't make that true.

Edit: Seems the commentator I replied to now have added "just personal stuff and a private forum" to their comment which was not there before, so most of my point is moot now, as I assumed at least semi-public content/service, not private.

Re:Who's Attacking My Server? by michaelcampbell on Sunday March 13, 2022 @03:58PM (#30665119)
I DO run a "public" service, in that it provides some info to people. However I run it at totally my own cost, the information is for entertainment value only (and not in the "I just say that to get around this being horrible in some way"; it's literally information about gaming and games), and I just don't need the hassle of the constant hack attempts. I block China and Russia, and have for years, using publicly available IP ranges.

Yes, I know it's not going to get just China and Russia. Yes I know I'm blocking false positives. Yes I know I'm allowing false negatives.

And honestly, I couldn't care less. It's my service, my information, my time, and my money, and I don't feel the least bit bad nor swayed by some appeal to morality or fairness.

> Your approach to security has a number of issues.

Your examples are a bit of non-sequitur. If I OVERBAN, I'm not decreasing my security. The non-(Chinese hacker) visitor in China can't get in, that's not a security issue. IP's being flagged as Chinese not being in China... can't get in also not a security issue. Vice versa is a bit of a security issue, with which the second layer of my security onion deals.

Re:Who's Attacking My Server? by Skiiing on Sunday March 13, 2022 @05:02PM (#30665662)
You typed my thoughts exactly. I run a popular website, and I just block everything from China, and do a Captcha challenge for others such as Russia. People don't have the right to access my website. If a Chinese citizen is (correctly) angry about the situation then they need to petition their government to change the culture that permits massive continuous hacking attempts from their country.

I use Cloudflare which makes blocking countries simple, no need to keep updated IP lists.

Re:Who's Attacking My Server? by grog454 on Sunday March 13, 2022 @05:46PM (#30666052)
Honest question: what impact did you see when you switched from not blocking China + Russia to blocking them? What type of attacks are you seeing primarily?

Failed login attempts / brute force attempts seem like the cost of doing business in public. I assume that if my servers are accessible from 1 or more public addresses, they WILL be subject to brute force attempts. I also assume that by making my passwords sufficiently randomized, the probability of these attacks having any effect is infinitesimal.

To me, blocking an IP because it tried to log in to your servers seems purely like a fear response with no rational basis (or at least a poor understanding of probability / stats). By extension, blocking a range of IPs because of some arbitrarily elevated frequency of login attempts seems equally silly.

Now for DOS attacks, temporary IP blocks make perfect sense.

Re:Who's Attacking My Server? by michaelcampbell on Tuesday March 15, 2022 @08:59AM (#30684676)
> Honest question: what impact did you see when you switched from not blocking China + Russia to blocking them? What type of attacks are you seeing primarily?

Thousands of brute force login attempts per day gone. The effect is, as you say, small, but it was non 0 and now it is 0, and it's a bunch of noise I don't have to wade through.

> Failed login attempts / brute force attempts seem like the cost of doing business in public.

Yup, and I pay that cost by blocking the source of 98% of them.

> purely like a fear response with no rational basis (or at least a poor understanding of probability / stats)

Thanks, clearly you know me well /s. And honestly, again, I don't feel that I even NEED a rational basis. It's my system, I'll block whomever I feel like blocking for whatever reason I want, thanks. If you want to deride me by calling into question my motives, you can do that too for whatever reason YOU want to, but that's on you.

Re:Who's Attacking My Server? by grog454 on Wednesday March 16, 2022 @03:45PM (#30703130)
> If you want to deride me by calling into question my motives, you can do that too for whatever reason YOU want to, but that's on you

You are free to act under whatever impetus you want and while I did call in to question your motives (implicitly), I never meant that as a derision. I frequently ask myself "why am I doing this?". It usually doesn't hurt to self reflect.

Edit: Something about this kept nagging me. And I think its this:

>It's my system, I'll block whomever I feel like blocking for whatever reason I want, thanks.

I see parallels to a sentiment that used to be fairly common in the U.S.:

"It's my store, I'll refuse whomever I feel like refusing for whatever reason I want, thanks"

Laws against that kind of thing are relatively new (1964?). You have a valid reason to block certain users (hacks) but do you really not see a problem extending that to national origin?

Re:Who's Attacking My Server? by mrjin on Sunday March 13, 2022 @08:59PM (#30667396)
The thing is there are so many attackers/rookies out there. I wouldn't call them hacker as they are most likely noob running scripts to scan the network. Just seconds after I exposed my server's SSH port, there were failed login attempts. I wasn't worried about someone breaking in as I've harden my server with all the patches, no password login allowed and the private key was on a YubiKey which I don't have it myself. So unless there was a 0-day I haven't patched, it's very unlikely someone else can actually gain access to it. From the logs I could see lots of failed logins using various user names/passwords most likely using a dictionary. Those nonsense soon flooded my logs and I eventually had to change the SSH port as I could not stand that any longer.

As you mentioned, simply ban couldn't help less. But anyway, their servers, their choices. I've no comment on that.

Re:Who's Attacking My Server? by victor106 on Sunday March 13, 2022 @09:23PM (#30667527)
> It's my service, my information, my time, and my money, and I don't feel the least bit bad nor swayed by some appeal to morality or fairness.

Nailed it!!! I feel the same

Re:Who's Attacking My Server? by mro_name on Monday March 14, 2022 @03:22AM (#30669378)
totally agree.

I can understand that limiting services is sad, but nobody has a claim either, right?

So offering to some is way better than offering to none because of overwhelming opsec work (which is still secondary to the content). If the vandals show a pattern, it's bad luck if one shows the same. And proxying should be known to those who suffer from the block.

Maybe internet has to let go the mania of offering everything to everybody all the time. Like real life.

Re:Who's Attacking My Server? by passivate on Sunday March 13, 2022 @06:28PM (#30666369)
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...
Re:Who's Attacking My Server? by alasdair_ on Sunday March 13, 2022 @07:09PM (#30666696)
> 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.

Re:Who's Attacking My Server? by passivate on Monday March 14, 2022 @12:17PM (#30674281)
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??

Re:Who's Attacking My Server? by alasdair_ on Monday March 14, 2022 @03:39PM (#30677177)
I'm doing the "it's still a 'public service' even if there are location restrictions" argument, since almost anything I can think of as a typical example of a "public service" (police, fire, medical, education, access to courts, etc.) also have location restrictions and we call all of those things "public services".

If you want a special definition of "public service" that means "accessible every human on earth without any exclusions" then that's fine, but telling someone something isn't a public service because you want to use a special definition of the phrase that no one else seems to use is a bit... overly argumentative?

Re:Who's Attacking My Server? by passivate on Tuesday March 15, 2022 @01:41AM (#30682008)
Fair enough, I didn't mean to be argumentative but I accept your criticism.
Re:Who's Attacking My Server? by karamanolev on Sunday March 13, 2022 @07:59PM (#30667036)
I think the commenter wouldn't have any issue calling it an "Americas/Europe"-only service and by his (and arguably, my) logic, it doesn't sound questionable. One has to make choices.
Re:Who's Attacking My Server? by lowwave on Sunday March 13, 2022 @06:59PM (#30666618)
think it is totally fine. Most the web is build around ASCII text any way. Since he is running it on his own dime, it is totally ok to not have Chinese/Russian visitors.
Re:Who's Attacking My Server? by fuzzy2 on Sunday March 13, 2022 @02:25PM (#30664238)
Yes, the server is of course properly secured. There was something that made me do this in the past, but I don't remember. Never had any problems with it whatsoever.

I do know, because my services (except the forum) are for me exclusively. On the forum, I know everyone. None of the members live in China, have relatives in China or travel to China. If they cannot access the forum, they can contact me in another way.

Re:Who's Attacking My Server? by chockchocschoir on Sunday March 13, 2022 @02:30PM (#30664296)
Yeah, if you're running private services, then my point is moot of course, should have known :) Thanks for explaining though.
Re:Who's Attacking My Server? by criddell on Sunday March 13, 2022 @02:08PM (#30664044)
I don't think it matters if the geo-location table is correct or not. If traffic from an IP range is entirely malicious, block that IP range. If that range happens to be Chinese or from Florida it doesn't really matter, does it?
Re:Who's Attacking My Server? by nkozyra on Sunday March 13, 2022 @10:48PM (#30668031)
Most of the time these malicious attacks will come from a data center, where someone is no doubt leasing some hardware until they get shut down.

When I get any number of malicious known attack vectors, I have a process that runs a few services against the IP for geolocation and server info. If it's a known data center, its block is immediately blocked, otherwise just the IP.

For whatever reason, they tend not to get new ips easily, so shutting down the IP will usually buy a few days before they have a new instance on qualys or whatever.

Re:Who's Attacking My Server? by alam2000 on Monday March 14, 2022 @02:58AM (#30669259)
In our environment, blocking all traffics from data centers are effective to prevent malicious attacks. You can get the data center ranges from IP2Proxy database.

We need to whitelist a few important servers that we are working with to prevent lock-down of good traffics.

Re:Who's Attacking My Server? by chockchocschoir on Sunday March 13, 2022 @02:24PM (#30664230)
Correct, blocking a IP block based on that malicious traffic comes from there might be a worthwhile strategy (although I'd argue that it's less important than properly configuring your stuff anyways, getting a new IP is trivial), and also a strategy which is different than what fuzzy2 was describing, which is what I was arguing against.
Re:Who's Attacking My Server? by IncRnd on Monday March 14, 2022 @01:44AM (#30668903)
Not the GP, but every web server I've ever run has had IP addresses originating from China at the top of the frequency list for nefarious attempts to compromise the security. If someone is temporarily visiting China and wants to visit one of my websites, they can wait until they return. I've not removing my blocks on IP addresses.
Re:Who's Attacking My Server? by dylan604 on Sunday March 13, 2022 @05:27PM (#30665897)
> I assumed at least semi-public content/service, not private.

Um, they posted information on a public website. It's not private. Even if the site is owned by them, it is publicly available, of their own accord.

Re:Who's Attacking My Server? by chockchocschoir on Sunday March 13, 2022 @07:13PM (#30666725)
"personal stuff" and "private forums" is probably as private as it gets, for being something accessible on the web, and I wouldn't call those publicly available, as you'd need to pass some sort of authorization/authentication to be able to see it. Or I gravely misunderstand your comment.