See harden_almalinux9.sh for server-specific hardening measures.
The harden_proxmox.sh script implements comprehensive security measures for Proxmox Virtual Environment while maintaining hypervisor functionality.
-
System Security
- System updates and package management
- AppArmor configuration
- Automatic security updates
- AIDE file integrity monitoring
- System auditing
-
Proxmox-Specific Security
- Web interface hardening
- Cluster security
- VM security defaults
- Storage security
- Backup protection
-
Network Security
- Proxmox firewall configuration
- Fail2ban implementation
- Snort IDS integration
- Network isolation
- SSH hardening
-
Virtualization Security
- VM resource limits
- VM isolation
- Storage security
- Network segregation
- Protection flags
-
Monitoring and Logging
- System accounting
- Audit logging
- AIDE integrity checking
- Snort IDS monitoring
- Service monitoring
- Proxmox VE installation
- Root access
- Working internet connection
- Basic understanding of virtualization security
-
Make the script executable:
chmod +x harden_proxmox.sh
-
Run the script as root:
sudo ./harden_proxmox.sh
-
Review the logs at
/var/log/proxmox_hardening.log -
Reboot the system:
sudo reboot
- Backup: Create a full backup of your Proxmox configuration and VMs before running this script
- Cluster: If running in a cluster, apply to each node separately
- VMs: All VMs will need to be stopped during the hardening process
- Network: Some network connectivity may be temporarily disrupted
- Custom Settings: Review firewall rules and security settings for your specific needs
- Web interface HTTPS enforcement
- Cluster communication security
- VM resource protection
- Storage security measures
- Backup integrity
- AppArmor enforcement
- AIDE file integrity
- System audit capabilities
- Automatic updates
- Service hardening
- Proxmox firewall rules
- Network intrusion detection
- SSH hardening
- Network isolation
- Fail2ban protection
-
Check system logs:
journalctl -xe
-
Review security logs:
cat /var/log/proxmox_hardening.log
-
Check service status:
systemctl status pve-firewall systemctl status auditd systemctl status snort
-
Verify security features:
pvefw status # Proxmox firewall aa-status # AppArmor status aide --check # File integrity
After installation:
- Review and customize firewall rules
- Configure Snort IDS rules for your environment
- Set up regular AIDE checks
- Configure backup retention policies
- Regular maintenance:
- Monitor system logs
- Check IDS alerts
- Verify VM integrity
- Update security policies
For issues or questions:
- Check the Proxmox documentation
- Review system logs
- Check the Proxmox forum
- Verify security configurations
See harden_arch_personal.sh for Arch Linux desktop hardening measures.
See harden_fedora_kde.sh for Fedora KDE desktop hardening measures.