Skip to content

Instantly share code, notes, and snippets.

@qzm
Last active February 25, 2024 02:56
Show Gist options
  • Save qzm/984ce31927ab8d0540177f4f9e47da2e to your computer and use it in GitHub Desktop.
Save qzm/984ce31927ab8d0540177f4f9e47da2e to your computer and use it in GitHub Desktop.
UFW配置
# ------- Debian -------
sudo apt-get install ufw -y
# ------- CentOS -------
sudo yum install epel-release -y
sudo yum install --enablerepo="epel" ufw -y
# ------- Config -------
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
# ------- Default -------
sudo ufw default deny incoming
sudo ufw default allow outgoing
# ------- Enable -------
sudo ufw status verbose
sudo ufw enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment