OPNsense Forum

English Forums => General Discussion => Topic started by: bunchofreeds on July 25, 2023, 10:35:54 PM

Title: Update Firewall Alias from Cloudflare API
Post by: bunchofreeds on July 25, 2023, 10:35:54 PM
Hi,

Is it possible to update an OPNsense Firewall Alias that holds all Cloudflare IP addresses using their API?

https://developers.cloudflare.com/fundamentals/get-started/setup/allow-cloudflare-ip-addresses/
https://www.cloudflare.com/ips/
https://developers.cloudflare.com/api/#cloudflare-ips-properties

Thanks for any help with this

Title: Re: Update Firewall Alias from Cloudflare API
Post by: sorano on July 25, 2023, 11:29:10 PM
Haven't used the API so cannot comment on that but the txt lists from here works great:

https://www.cloudflare.com/ips/
Title: Re: Update Firewall Alias from Cloudflare API
Post by: isaacthekind on October 27, 2023, 08:55:07 PM
I used an IP table in the alias options, this checks if they have changed at an interval that I set.
Title: Re: Update Firewall Alias from Cloudflare API
Post by: bunchofreeds on December 13, 2023, 10:49:55 PM
Late reply - sorry

I followed your advice and configured an Alias using URL Table (IP's)
Pasted in the Cloudflare IP list URL and set to check every 7 days

Works really well!

Thanks