/srv/irclogs.ubuntu.com/2021/05/11/#ubuntu-server.txt

lordievaderGood morning06:07
=== setuid is now known as zZzzZzetuid
=== StathisA_ is now known as StathisA
=== zZzzZzetuid is now known as setuid
=== m1dnight1 is now known as m1dnight_
fooJust happened to catch someone trying to brute force my system via ssh. Is there any quick way to lock sshd down from that happening again? Looks like it happened a ton before I caught it14:54
aaronrfoo: apt install fail2ban14:55
aaronrbans repeat login offenders for a configurable amount of time to slow/stop bruteforce attacks14:55
aaronr(works for services other than SSH too, but only SSH is configured by default)14:55
sdezielfoo: if you can, disable password authentication and relying key only15:00
beztfoo: For fail2ban, consider enabling the recidive jail in addition to ssh.15:13
andolfoo: Or simply disallow password login, which you kind of should do anyway?15:26
mybalzitch^ x215:27
andol...which I now see has already been suggested. Sorry about that.15:27
sdezielwell, that can't be repeated enough ;)15:36
sarnoldfoo: ufw limit can force rate-limiting to the sshd (or any other service, but it's probably best-tuned for sshd..) -- but double-plus-votes on the disable password auth16:00
CodeMouse92Permissions went wonky on my Ubuntu 20.04 server this morning, and now I've getting lots of "failed to mount <X> file system" errors16:07
CodeMouse92Three hard drives, all of them failing. Verified the external still works on a diff device. I assume it's the motherboard that just bit the dust?16:08
sarnold:(16:09
CodeMouse92sarnold: Is that a correct assessment, do you think?16:09
CodeMouse92It won't even mount the kernal file system16:09
CodeMouse92*kernel16:09
sarnoldCodeMouse92: I'm lucky, I don't often see failed hardware16:10
sarnoldCodeMouse92: but that certainly feels plausible16:10
CodeMouse92kk. I do have a couple of other towers sitting about, I'm going to try swapping in the hard drives and network card and seeing if that works.16:11
sarnoldyay16:11
CodeMouse92I've been running this thing for...what, nine years?16:13
sarnold*sniff* goodbye trusted (and probably ran trusty) machine16:15
CodeMouse92Trusty at one point. Focal when it died16:17
CodeMouse92sarnold: Not the motherboard. Swapped into a different tower, same problem16:45
sarnoldCodeMouse92: uhoh. do you have any way to test the drives via eg usb sata adaptors on another machine?16:46
CodeMouse92Yeah, doing that now16:47
CodeMouse92sarnold: Both mount here, each reporting "one bad sector16:51
CodeMouse92But I'm used to that on HDDs.16:51
CodeMouse92As long as it's not interfering with operation, that's usually fine16:51
sarnoldI wonder what's different..16:51
CodeMouse92Yeah. Neither work when plugged in16:51
CodeMouse92I mean...to the tower16:52
CodeMouse92But they both work here16:52
sarnoldpowersupply?16:52
sarnoldwhen those go wonky they can lead to hard to understand problems16:52
CodeMouse92Would that do that?16:52
CodeMouse92Hmm16:52
sarnoldI've seen stranger16:52
CodeMouse92Well....no...it can't be that, because I swapped the hard drives b/w *towers*16:52
CodeMouse92The only things I moved between towers were the two HDDs, the PCIExpress network card, and the RAM16:53
CodeMouse92Everything else was the same16:53
sarnoldohhhhh. strange strange.16:57
CodeMouse92sarnold: What would it mean to you if this hard drive has remounted itself three times in the past five minutes16:57
CodeMouse92I can read files from it, but it keeps remouting16:57
sarnoldCodeMouse92: not sure; corrupt filesystem, bad memory, bad motherboard, bad hard drive, bad cables, bad controller, all feel on the table16:57
CodeMouse92RAM shouldn't do this16:58
CodeMouse92Cables were diff16:58
CodeMouse92Or....were they? Hmm16:58
CodeMouse92No, cables are diff16:58
CodeMouse92B/c this remounting regularly *here* is on a diff cable, that's weird16:59
CodeMouse92I'll run a SMART test on this17:00
CodeMouse92sarnold: Uhm...this is claiming the disk doesn't support SMART17:01
CodeMouse92I could've sworn it did before17:01
incognegro76I'd move just the HDD's, one at a time if possible, and see if they work in the other tower17:02
sarnoldCodeMouse92: usb is funny that way..17:02
CodeMouse92sarnold: It's never not worked over USB before ;)17:03
CodeMouse92incognegro76: I mean, I can...the trouble is, I can't really *know* until I boot, and the hard drive in question is the system drive17:03
sarnoldCodeMouse92: I think there's a command line switch you can give to smartctl to get it to try, but I think not all usb adaptors can pass it through, and I'm not sure if that's the default to try it anyway or not :/17:03
CodeMouse92Oh, pointed to a sector instead of a devie, silly me17:03
sarnoldCodeMouse92: oh good, results? :)17:04
CodeMouse92I don't know yet17:04
CodeMouse92Just started short test17:04
CodeMouse92Uhm...passed? Weird17:05
CodeMouse92SMART is not showing *anything* of concern17:06
CodeMouse92Just assuming that the remounting is not the HDD's fault, I'm going to plug just this drive into the tower (per incognegro76's idea) and see if the error continues.17:07
CodeMouse92I can boot the machine to other hard drives, as long as this one isn't plugged in.17:29
CodeMouse92So I will need to reinstall :(17:29
CodeMouse92Given that I only have one bad sector, I may be able to copy *some* things from the dying HDD directly.17:33
foosarnold / andol / bezt / sdeziel / aaronr - a bit delayed, but thank you on suggestions to stop ssh brute force. In the short term I changed ports (before asking here). Disabling pass auth is an easy one, I thought I did that but will double check. Also will look into fail2ban.17:50
sarnoldwoot17:50
fooWell, guess it wasn't. I may have enabled it at one point for a short term solution without disabling it17:51
fooPasswordAuthentication no17:51
fooThanks ya'll. Will check about fail2ban next but my hunch is this will do me some good.17:52
TJ-foo: you could consider a port-knocker, such as fwknop-server and fwknop-client18:31
TJ-!info fwknop-server18:31
ubot3fwknop-server (2.6.10-12, hirsute): FireWall KNock OPerator server side - C version. In component universe, is optional. Built by fwknop. Size 83 kB / 246 kB. (Only available for linux-any.)18:31
ShellcatZeroThanks Odd_Bloke, do you have any specific documentation you can share which provides those details regarding the mirrors? I'm interesting in finding out more about the substantive differences between the mirrors and what (if any) changes that AWS makes or requires for software featured on those mirrors, and how software updates might be prioritized differently on the mirrors.19:20
sarnoldShellcatZero: there's two things here; the ubuntu pro instances have some changes available https://ubuntu.com/aws/pro19:33
sarnoldShellcatZero: the 'usual' ubuntu ec2 mirrors are just squids that sit in front of the main archives19:34
Odd_Blokepowersj: You might have some more official info about these mirrors?20:42

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!