Skip to content

PATCH method on /api/v2/firewall/nat/port_forward seems to set the destination incorrectly on the corresponding firewall rule #659

@PowerMeep

Description

@PowerMeep

Describe the bug
When I call PATCH on port_forward, the destination of the firewall rule is overridden with the destination of the port forward. I believe this should be equal to the target of the port forward.

To Reproduce
Steps to reproduce the behavior:

  1. GET /api/v2/firewall/nat/port_forwards
  2. Choose one of them
  3. In the UI, under Port Forwards, note that Dest. Address == destination and NAT IP == target
  4. In the UI, under Firewall Rules, note that Destination == target
  5. PATCH /api/v2/firewall/nat/port_forward with the chosen item. Optional: change an unrelated field, such as description
  6. POST /api/v2/firewall/apply
  7. In the UI, under Firewall Rules, note that Destination == destination
  8. In the UI, update the Port Forward and change an unrelated field, such as description
  9. Apply the changes.
  10. In the UI, under Firewall Rules, note that Destination == target. This demonstrates that the behavior of the UI is different from the behavior of the API call.

Screenshots or Response
I can attach a screenshot if needed, but would prefer to keep my Pfsense configuration private.

pfSense Version & Package Version:

  • pfSense Version: 2.7.2
  • Package Version: 2.3.3

Affected Endpoints:

  • URL: /api/v2/firewall/nat/port_forwards

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions