Discussion
Loading...

Discussion

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Zack Weinberg
@zwol@masto.hackers.town  ·  activity timestamp 2 months ago
  1. Moving ssh to a nonstandard port probably isn't worth the hassle. I need to do some actual statistics on this, but I think that if you disable remote password login, and set up fail2ban or equivalent for port 22, that's more than good enough, unless you're a hyperscaler, in which case you probably have a separate control-plane network interface anyway.
  • Copy link
  • Flag this post
  • Block
Zack Weinberg
@zwol@masto.hackers.town replied  ·  activity timestamp 2 months ago
  1. Turn off memory overcommit.
  • Copy link
  • Flag this comment
  • Block
Zack Weinberg
@zwol@masto.hackers.town replied  ·  activity timestamp 2 months ago
  1. Moving ssh to a nonstandard port probably isn't worth the hassle. I need to do some actual statistics on this, but I think that if you disable remote password login, and set up fail2ban or equivalent for port 22, that's more than good enough, unless you're a hyperscaler, in which case you probably have a separate control-plane network interface anyway.
  • Copy link
  • Flag this comment
  • Block
JdeBP
@JdeBP@tty0.social replied  ·  activity timestamp 2 months ago
@zwol

This year I've watched attackers send HTTP requests to the IDENT port and RDP requests to the GOPHER port.

Anyone who thinks that attackers don't know about switching services to other ports is living in a bit of a fantasy. (-:

@ska
#ssh

  • Copy link
  • Flag this comment
  • Block
Zack Weinberg
@zwol@masto.hackers.town replied  ·  activity timestamp 2 months ago
  1. fail2ban is most definitely worth it, but other firewalling has a good chance of being more trouble than it's worth. In particular, I wouldn't bother with dropping instead of rejecting SYNs to closed ports, and I'm dubious about firewalling by port number. (About the only thing that's good for, IMO, is putting an extra speed bump in front of an adversary who already has remote execution and wants to persist it.)
  • Copy link
  • Flag this comment
  • Block
Zack Weinberg
@zwol@masto.hackers.town replied  ·  activity timestamp 2 months ago
  1. The biggest single thing you can do to protect yourself against privilege escalation into the kernel is to use a monolithic kernel. (There are a bunch of other places that you need to tweak if you want to be really sure no one can ever inject code into supervisor mode, but without CONFIG_MODULES=n or equivalent they're all pointless.) It's a damn shame that current Linux distros make this so hard.
  • Copy link
  • Flag this comment
  • Block
Zack Weinberg
@zwol@masto.hackers.town replied  ·  activity timestamp 2 months ago
  1. Closely related to 7: The sheer complexity of Linux's various "mandatory access control" modules - SELinux, AppArmor, etc - leads me to believe that most people are better off not only not using them, but configuring them out of the kernel.

    I don't know what the *BSD equivalents are, or if they even have any, but if they do I suspect they're equally complex, because the people who want this feature have complex needs.

  • Copy link
  • Flag this comment
  • Block
Zack Weinberg
@zwol@masto.hackers.town replied  ·  activity timestamp 2 months ago
  1. Don't bother with "secure boot" or with encrypted disks. The only threats these protect against, that are relevant to normal people, are the "malicious hotel staff" and/or "laptop thief" attacks, which are moot for a server. And the risk of bricking the system is very real.
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login