nginx IP ACL List -- how to automate?

Started by Grossartig, January 05, 2021, 05:14:53 PM

Previous topic - Next topic
I am using the nginx plugin in OPNsense and am trying to create an IP address ACL list programmatically, rather than having to construct it manually from the UI. I know how this works in the nginx.conf file directly, but that file gets overwritten (re-created) from the UI with every change.

Where are the UI-created ACL lists stored so that I could modify them on the back-end? Are they in a database or text files?

Specifically, I am trying to whitelist all Google Cloud IP address ranges that are listed here:https://www.gstatic.com/ipranges/cloud.json.

Thanks!

everything is stored in config.xml but you probably like to write a custom cron script you can run automatically or use the API provided by the plugin. The UI is using the API as well so you can just dump its requests from the developer console.