6

Some time ago I added below rule for local port forwarding

firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=3000

How can I remove this rule now?

2 Answers 2

8

You can remove it just as it was added:

# firewall-cmd --permanent --remove-forward-port=port=80:proto=tcp:toport=3000
# firewall-cmd --reload
1

Instead of reloading you can also change runtime settings and then make it permanent

# firewall-cmd --permanent --remove-forward-port=port=80:proto=tcp:toport=3000
# firewall-cmd --runtime-to-permanent
1
  • 1
    You need to remove the --permanent option from the first command, otherwise, this will result in no change.
    – guzzijason
    Commented Sep 16, 2018 at 6:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .