OPNsense Forum

English Forums => General Discussion => Topic started by: Simon on April 13, 2019, 09:47:56 pm

Title: Import / Export Alias
Post by: Simon on April 13, 2019, 09:47:56 pm
I cant see a way to import or export (save) Alias IPs or Hosts
This option used to be in previous versions and was very useful
You can paste, but it doesnt always work and you cant save

Please bring this feature back
Thanks
Title: Re: Import / Export Alias
Post by: franco on April 14, 2019, 09:54:37 am
There's a JSON-based import/export on the development version of 19.7.


Cheers,
Franco
Title: Re: Import / Export Alias
Post by: GaardenZwerch on June 07, 2019, 08:06:12 am
I believe I have found a bug with export/import, when aliases reference other aliases, the order is important.

I had sth like:

Code: [Select]
voipservers={voip1,voip2}

voip1={...}

voip2={...}


in a file, and import choked on voip2 is not an IP address nor a hostname.

I then deleted the definition of the voipservers from the file and it imported  fine.
I then re-imported the original file (so voip1 and voip2 where already known) and it worked fine too.

I tried fixing the order in the file (copy the definition of voipservers after voip1 and voip2), but that didn't help.

Apart from doing multiple passes on import, I don't see an easy way to fix this.
Title: Re: Import / Export Alias
Post by: AdSchellevis on June 07, 2019, 09:20:30 am
It sounds like an issue indeed, can you file a bug report here https://github.com/opnsense/core/issues (https://github.com/opnsense/core/issues)?

Thanks in advance,

Best regards,

Ad
Title: Re: Import / Export Alias
Post by: GaardenZwerch on June 07, 2019, 01:24:30 pm
Thanks,
done!

Best regards,
Frank