Back to Blog
Linux

Hardening de Servidores Linux: Guia Prático

Admin Mundounix
March 21, 2026
1 min read

Hardening de Servidores Linux: Guia Prático

A segurança de servidores Linux é fundamental para qualquer infraestrutura. Este guia apresenta técnicas práticas de hardening.

1. Atualizações

Mantenha o sistema sempre atualizado:

# Debian/Ubuntu
apt update && apt upgrade -y

# CentOS/RHEL
yum update -y

Configure atualizações automáticas de segurança:

apt install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades

2. Usuários e SSH

Desabilite root login via SSH

# /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes

Use chaves SSH

ssh-keygen -t ed25519 -C "seu-email@dominio.com"
ssh-copy-id usuario@servidor

3. Firewall

UFW (Ubuntu)

ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow https
ufw enable

firewalld (CentOS/RHEL)

firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

4. Fail2ban

Proteção contra brute force:

apt install fail2ban
systemctl enable fail2ban
systemctl start fail2ban

5. Auditoria

Instale e configure auditd:

apt install auditd
systemctl enable auditd

Conclusão

O hardening é um processo contínuo. Monitore logs, mantenha-se atualizado sobre vulnerabilidades e revise configurações regularmente.

A Mundounix oferece serviços de hardening e segurança de servidores. Entre em contato!

Enjoyed the article?

Share it with your colleagues!

AM

Admin Mundounix

Linux

Mundounix team specialist with experience in open source infrastructure projects for companies across various sectors.

Need help with your project?

Our team is ready to help you implement these solutions.

Contact Us