Ufw 防火墙规则

一组最常用的 UFW 规则如下。


ufw allow OpenSSH

ufw allow 80/tcp

ufw allow 443/tcp

ufw enable

ufw status verbose

如果只想临时关闭:


ufw disable