Interview Prep/Networking/Security: Firewalls, SGs, NACLs & VPN

Many SSH brute-force attempts hit a public host. How do you stop them?

IntermediateScenarioSecurity: Firewalls, SGs, NACLs & VPN
Answer

Situation read → Reduce exposure, then rate-limit.

What I'd do →

  1. Close the port to the world and use SSM or a VPN
  2. If SSH must be public, disable passwords in /etc/ssh/sshd_config: PasswordAuthentication no and PermitRootLogin no
  3. Install fail2ban: fail2ban-client status sshd
  4. Use security group allow lists
  5. Review journalctl -u ssh and lastb

Why → Key-only auth makes brute force pointless, and allow lists remove the noise.

Interview tip → Say moving SSH to another port is cosmetic, not security.

All Networking questions Roadmap: Networking for DevOps

More on Security: Firewalls, SGs, NACLs & VPN