删除 firewall-cmd 中的 --add-forward-port 规则

ida*_*ika 4 redhat firewall-cmd

前段时间我添加了以下本地端口转发规则

firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=3000
Run Code Online (Sandbox Code Playgroud)

我现在如何删除此规则?

guz*_*son 6

您可以像添加一样删除它:

# firewall-cmd --permanent --remove-forward-port=port=80:proto=tcp:toport=3000
# firewall-cmd --reload
Run Code Online (Sandbox Code Playgroud)