how to delete port_forward #435
Unanswered
yuecheng88
asked this question in
Q&A
Replies: 1 comment
-
You can use the GET /api/v1/firewall/nat/port_forward endpoint to list all existing port forwards. You can obtain the IDs of port forwards as described in the 'Obtaining object IDs' section of the Queries section in README.md. Once you have the ID of the object, you can delete with a DELETE request to /api/v1/firewall/nat/port_foward?id=ADD_ID_HERE. Since pfSense uses dynamic IDs, you will need to make another GET request to /api/v1/firewall/nat/port_forward to get the updated IDs of port forwards before making more DELETE requests as their IDs may have changed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to create some nat rule to let my internal machine can be accessible, also need delete it .But port_forward without list api ,so I cannot find this id【if i have delete ,the id can change】.
so the bad plan is :
I hope have this api for delete use the only identification. in this api you can first find the id by the only identification,and then delete.
Beta Was this translation helpful? Give feedback.
All reactions