Linux – ulimit Hardening (Bash)

Below is a ready-to-use script. Review and adapt variables to your environment.

#!/usr/bin/env bash
cat >/etc/security/limits.d/99-hardening.conf <<'EOF'
* soft nofile 65535
* hard nofile 65535
root soft nofile 65535
root hard nofile 65535
EOF
echo "Configured /etc/security/limits.d/99-hardening.conf"
  

← Back to SQL