安装ufw

apt update -y && apt install -y ufw

启动ufw

ufw enable

开放端口22 80 443 2082进站流量

ufw allow ssh

ufw allow http

ufw allow https

ufw allow 2082

查看端口状态

ufw status

关闭端口的进站

ufw delete allow 2082

暂停ufw

ufw disable

重置ufw

ufw reset

标签: none