Cloudflare DDNS

If you have a Dynamic WAN IP, you'll need to set up some sort of DDNS client. Most ISPs use Dynamic IPs with residential customers, so this is pretty common and there are multiple options for working around this. I currently manage my domains with Cloudflare, so I'll be using their DDNS so I can have all my management under 1 provider. Setting this up is fairly simple! 

First, make sure the os-ddclient plugin is installed on your OPNsense firewall. Once installed, navigate to Services ---> Dynamic DNS ---> Settings:

image.png

Next, select the "+" icon to add an account. 

image.png

Open up a web browser and create an A Record with your domain registrar for a subdomain. On Clouflare its fairly simple. Navigate to your DNS records, and create a new record:

ddns a record.png

Your final settings should look like this:

ddns a record conf.png

With this record saved, navigate to your API tokens and generate a new API token. Navigate to Overview in Cloudflare, then scroll down and select "Get API token". On the next page, select create token:

image.png

Use the "Edit zone DNS" template and configure the following:

image.png

With your A Record configured, and API token in hand, you can now go back to the OPNsense Page:

image.png

opnsense ddns.png

Save your settings and apply the new configurations. Select the refresh icon and your WAN IP should now be updated! 

ddns.png

Check your DNS A Record to see if your WAN IP has updated. It should automatically update. You can now get your WAN IP from this subdomain, as it'll automatically update. To ensure it automatically updates, I've created a cron job in my router to check for changes in my IP every 6 hours and update if necessary. 

 


Revision #3
Created 1 April 2024 19:47:46 by Austin
Updated 1 April 2024 20:13:33 by Austin