Archive > 19.7 Legacy Series

Feature Request: API - Firewall - alias_util - Add

(1/1)

cbass:
I've been testing out the API, specifically Firewall Module, alias_util controller, and add command. All seems to work when trying to add to a host type with an ip address but I have a specific application where I would like to add using a hostname or FQDN.

Looking at the AliasUtilController.php source, I see the addAction function first checks if the request contains "address" and then checks if it contains valid IP Addressing notation.

My request is to add the option of adding "hostname" or "fqdn" instead of just "address". I don't know if this was added in later releases of Opnsense as I'm running 19.7.5 but if it was, could you please let me know? I didn't see anything specific to this in the release notes for newer releases.

Thank you and appreciate all the hard work going into making Opnsense.

ManBat:
Hi there,

Can you share a snippet of code where you have this working because I get, variably:
{"status":"failed","status_msg":"non existing alias <aliasname>"}

for a post to /api/firewall/alias_util/add/test

For what it's worth I have also tried addItem but that also fails.

Cheers,
MB

Navigation

[0] Message Index

Go to full version