ubuntu下查看(改变)本地端口开放情况,开启和关闭防火墙

查看开放端口:

sudo ufw status

允许80端口开放:

sudo ufw allow 80

允许22端口开放:

sudo ufw allow 22

启动防火墙:

sudo ufw enable

重启防火墙使端口配置生效:

sudo ufw reload

 

posted @ 2019-05-17 12:45  Geeksongs  阅读(8377)  评论(0编辑  收藏  举报

Coded by Geeksongs on Linux

All rights reserved, no one is allowed to pirate or use the document for other purposes.