Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ehe

#1
Hi Cedrik,

I already figured it out. /api/firewall/filter/searchRule?current=1&rowCount=10&searchPhrase=sometext only works on rules created by the addItem API call. It will not return any rules created manually in the GUI. Is this by design?

Not able to automate port-forwarding is an issue for me. Is it on the roadmap?

Regards
#2
Hi Cedrik,

Thanks. Indeed using api/firewall/filter/del_rule/92e3870d-f888-44ed-97c8-943a0d90029a worked

Also toggleRule?92e3870d-f888-44ed-97c8-943a0d90029a failed, but changing this to toggle_rule/92e3870d-f888-44ed-97c8-943a0d90029a worked

One other question.
An GET api/firewall/alias/searchItem?current=1&rowCount=10&searchPhrase=sometext works, but when i want to do the same as described in the documentation on Filter Rules by doing: /api/firewall/filter/searchRule?current=1&rowCount=10&searchPhrase=sometext it doesn't give back any rows, although i have a rule with "sometext" in the description.
Is my syntax incorrect or do i need to search also on the interface, and how do i specify this?

And a final question. Is there an API to create a NAT Port-Forward?

Regards
#3
I'm using OPNsense 24.7.12
#4
Hi Cedrik,

The /api/firewall/filter/getRule/92e3870d-f888-44ed-97c8-943a0d90029a worked using curl and in the browser (logged in as admin).

Doing the same syntax with delRule gave the "Endpoint not found" using curl and in the browser (logged in as admin).

The problem is that i can't delete this Rule from the GUI, because it is created by an automation.

Regards
#5
Hi,

I wanted to remove an Filter Rule i created via the API, however this fails. The documentation shows:
API Firewall

But when i do:
curl -u "thekey:thesecret" -X POST "https://192.168.x.x/api/firewall/filter/delRule?uuid=92e3870d-f888-44ed-97c8-943a0d90029a" -d ""
I get
{"errorMessage":"Endpoint not found"}
Even when i remove the uuid parameter

The documentation is also not clear if i should use "uuid=" before the uuid, but with or without doesn't make a difference.

Regards