Linux Security Hardening — Concept Check
Questions on Linux Security Hardening. Harden a Linux server by securing SSH, configuring the firewall (iptables/ufw), auditing with auditd, managing SELinux/AppArmor, and following the principle of least privilege throughout.
Questions in this quiz
7 questions on Linux Security Hardening — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A Linux server is experiencing unauthorized SSH login attempts. Which SSH configuration change can help mitigate this?
- ADisable root login
- BAllow all users to access
- CEnable password authentication
- DIncrease MaxAuthTries
2.You have configured your Linux server's firewall using ufw. What is the default behavior for incoming and outgoing connections?
- AAllow all incoming and outgoing
- BAllow all incoming, deny all outgoing
- CDeny all incoming, allow all outgoing
- DDeny all incoming and outgoing
3.After setting up fail2ban, you notice repeated failed login attempts from a specific IP. What should you do to prevent further attempts?
- AIncrease bantime to permanently block
- BAllow the IP for monitoring
- CManually deny the IP in ufw
- DDisable fail2ban
4.A user reports they can't access a service on port 5432 from outside the internal network. What firewall rule might be causing this?
- Aufw allow 5432/tcp
- Bufw deny from 10.0.0.0/8
- Cufw allow from 10.0.0.0/8 to any port 5432
- Dufw default allow incoming
5.You want to ensure that only secure key exchange algorithms are used in SSH. Which configuration change helps achieve this?
- ASet PermitRootLogin to yes
- BUse weak HostKeyAlgorithms
- CSpecify strong KexAlgorithms
- DEnable password authentication
6.Which command is used to apply sysctl hardening configurations immediately?
- Asysctl enable
- Bsysctl -p /etc/sysctl.d/99-hardening.conf
- Csysctl apply
- Dsysctl reload
7.What is the purpose of auditd in Linux security hardening?
- ATo disable root login
- BTo log security-relevant events
- CTo perform system updates
- DTo manage firewall rules