Linux common commands-48: ufw

ufw program is used to manage firewalls. Compared with iptables , it is easier to use. By default, sudo apt install ufw needs to be manually installed.

Syntax format: ufw [parameter]

Common parameters:


 # 启动ufw enable # 关闭ufw disable # 重启ufw reload # 显示防火墙状态及规则ufw status # 重置配置ufw reset # 允许外部访问80端口ufw allow 80 # 禁止访问80端口ufw delete allow 80 # 只允许特定网段访问ufw allow from

This article is reprinted from
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment

Your email address will not be published.