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?

idazuwaika
  • 209
  • 2
  • 4
  • 9

2 Answers2

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
guzzijason
  • 1,410
  • 8
  • 18
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
Nur
  • 386
  • 1
  • 7
  • 1
    You need to remove the `--permanent` option from the first command, otherwise, this will result in no change. – guzzijason Sep 16 '18 at 06:50