Debian服务器上的sudo ufw status最初显示了以下配置:
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)我已经成功地允许通过sudo ufw allow http进行http连接,这产生了以下结果:
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
80 ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
80 ALLOW Anywhere (v6)是什么命令来逆转这一点呢?我尝试过sudo ufw deny http,但现在sudo ufw status与原来不同了(它现在明确列出了http被拒绝的列表):
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
80 DENY Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
80 DENY Anywhere (v6)这是否与我的初始配置相同,还是有不同的命令来恢复sudo ufw allow http?
发布于 2016-06-03 17:41:21
从ufw的手册页面,它支持一个“删除”命令
delete RULE|NUM
deletes the corresponding RULE他们还举了一个例子:
To delete a rule, simply prefix the original rule with delete with or without the rule comment. For example, if the original rule was:
ufw deny 80/tcp
Use this to delete it:
ufw delete deny 80/tcp
You may also specify the rule by NUM, as seen in the status numbered output. For example, if you want to delete rule number '3', use:
ufw delete 3https://stackoverflow.com/questions/37620348
复制相似问题