Last active
February 25, 2024 02:56
-
-
Save qzm/984ce31927ab8d0540177f4f9e47da2e to your computer and use it in GitHub Desktop.
UFW配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------- 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