6 ms·
This is less of a hardening tip and more of a log quieting tip.
by yjftsjthsd-h 8y ago
This is less of a hardening tip and more of a log quieting tip.
- leeoniya 8y agoit cuts down the drive-by noise by 97%. which lets you not overlook anomalies in the remaining 3%. we also had a bunch of scanners probing for common php scripts on the http server (we don't run php). simply returning a 404 header and disabling logging in nginx for \.php$ uris cut down a bunch of garbage (mostly from China). additionally, using ngx_http_limit_req_module reduced the effects of numerous DoS-type scanners. so far, this + iptables for only 80/443/ssh has been a superior solution to instaling fail2ban that continually scans bloated log files and performs constant iptables banning/unbanning foo. clean logs are essential, not just nice to haves.
- Someone1234 8y agoWell said. "Log noise" is a legitimate security concern all by itself. It is actually disappointing how rarely it is discussed, and how in this world of "AI everywhere" there's no great smart AI log analysers to reduce the signal:noise. Moving the SSH port might "only" reduce noise, but that's a legitimate security goal in its own right.
- thaumaturgy 8y agoThat's because people can't agree on what is or isn't valuable. For instance, if I (or my software anyway) see a bunch of sshd login attempts from some IP, and then that IP decides to try imap ... yeah, that's getting insta-blocked. And that's hard to do if you decide to just ignore the sshd attempts.
- hawski 8y agoCould additional honey pot on 22 help? Run sshd on non-standard port and honey pot on 22. Then automatically ban all the hosts that would connect to it. There could be a concern for a mistake, so then ban for limited time at first or something.
- seanwilson 8y ago> "Log noise" is a legitimate security concern all by itself. It is actually disappointing how rarely it is discussed, and how in this world of "AI everywhere" there's no great smart AI log analysers to reduce the signal:noise. That's because after many people learn about not using "security through obscurity" they apply the rule without thinking as if obscurity never has any benefit for anything.
- hackbinary 8y agoWhat about tarpitting known spurious attacks? Possibly proxying/forwarding to a different host?
- tempfs 8y agoNothing externally accessible should allow password login at all. SSH key-based logins are so much more secure and convenient as heck once you invest the time to learn how they work.
- systematical 8y agoFor PCI you still need two factor. Its overkill, but we kept password logins even after having keys.
- amaccuish 8y agoA smartcard is still fairly convenient and allows you to tick the two-factor box (card + pin)
- dokument 8y agoAdditionally having a non-standard port does help defend against 0day exploits before patches are available or before you are able to disable the port.
- tptacek 8y agoWhen was the last preauth remote vulnerability in OpenSSH?
- leeoniya 8y agonevertheless, past performance is not an indicator of future outcomes, right?
- tptacek 8y agoPast performance doesn't guarantee future performance. It's usually a very strong indicator. Putting SSH on a nonstandard port is pretty silly.
- leeoniya 8y ago> Putting SSH on a nonstandard port is pretty silly. what's the alternative while still keeping ssh logs that aren't filled with thousands of login attempts from bots per day? afaik there isnt any solution that is both as simple and as effective as changing the port.
- deathanatos 8y agofail2ban will cut down on log noise signficantly, while still allowing you to operate on the standard port. It also thwarts brute-force login attempts, if you're using password authentication. (Which you shouldn't, without good reason. Use public key authentication.)
- tyingq 8y ago