OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: cybernik on March 23, 2023, 04:03:21 PM

Title: Update Alias with multible Host entries
Post by: cybernik on March 23, 2023, 04:03:21 PM
I try to update the firewall alias rules with API but run into problems.
I can update a host entry in alias but cannot update multible hosts entries.
Where can I find some references to do this?
Maybe someone has already done such an update.
Title: Re: Update Alias with multible Host entries
Post by: Fright on March 23, 2023, 05:43:05 PM
use browser dev-console to view api request payload when do similar update via gui?
Title: Re: Update Alias with multible Host entries
Post by: cybernik on March 23, 2023, 08:33:36 PM
Thx! That was a good hint!
I found no information in web about this.
For any one who run into the same problem:
To define multible hosts in an alias each IP Address has to be seperated by \n
See Examle:
{ "alias": { "name": "test", "content": "1.1.1.1\n2.2.2.2\n3.3.3.3", "enabled" : "1", "type" : "host"}}