A superset of these best practices in the article would be CIS benchmarks. Collectively agreed on by industry leaders and provide extensive resources that span the gamut of cloud, networking, and storage infrastructure. CIS supported technologies: https://www.cisecurity.org/cis-benchmarks CIS Audit AWS infra: https://github.com/toniblyx/prowler Better to be proactive than reactive :^)
If you are on AWS you dont need bastion hosts anymore. Use Session Manager.
SSH Bastion Host Best Practices
71–80 of 91 posts
Re: SSH Bastion Host Best Practices
#72I think this article has come up before? Either way, it's a quirky thing for Gravitational to post, since their flagship project --- Teleport --- basically eliminates bastion servers altogether (you might think of it as an API-controlled self-contained bastion server). Teleport is free, and worth checking out: it solves a bunch of SSH management problems, not just controlling access, but also linking SSH access to SS…
Realistically what is the risk of ssh being exposed if white listing is done, 2 factor auth and key auth are used? I suppose someone using a zero day, spoofing or from a whitelisted IP may successfully exploit but really?
Re: SSH Bastion Host Best Practices
#73Re: SSH Bastion Host Best Practices
#74If you decide to use a bastion host, why not use a security-focused OS like OpenBSD?
Re: SSH Bastion Host Best Practices
#75Re: SSH Bastion Host Best Practices
#76There's a few weird things, but it's mostly okay. Do not trust the firewall on the bastion host, if an attack can get into the bastion host, they can disable the firewall, so it cannot be used to limit egress. It's better than nothing, but consider using a firewall that's managed on a via a separate management network. I do agree that you should only allow SSH from a few known IPs. Limiting the number of users is wei…
If you use SSM instead of a bastion host, how do you tunnel traffic to internal services that are not exposed to the internet?
Re: SSH Bastion Host Best Practices
#77Another really useful tool is logwatch.
I actually caught an intruder this way hijacking my system several years ago. They removed rkhunter, chkrootkit and a variety of log files. And, modified lines in the last logged in users log. But, a combination of logwatch and tripwire caught it.
https://opensource.com/article/18/1/securing-linux-filesyste...
Re: SSH Bastion Host Best Practices
#78Re: SSH Bastion Host Best Practices
#79People still use Bastion hosts? I'm trying to grok why they're better than SOCKS5 proxies... Is it because they provide shell access and a larger attack surface? ;-)
Re: SSH Bastion Host Best Practices
#80It does not seem to be mentioned here. But, my #1 hardening suggestion is install the Tripwire IDS (Intrusion Detection System). It is probably the best thing you could ever do for yourself as a system administrator. It integrity checks the entire file system. If anything happens to your system that you didn't authorize you're notified of it immediately. After initial install it is important to minimize and exclude f…