OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: Grossartig on January 05, 2021, 05:14:53 PM

Title: nginx IP ACL List -- how to automate?
Post by: Grossartig on January 05, 2021, 05:14:53 PM
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 (https://www.gstatic.com/ipranges/cloud.json).

Thanks!
Title: Re: nginx IP ACL List -- how to automate?
Post by: fabian on January 10, 2021, 10:18:05 AM
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.