This is something that wasn’t key for me but since I’ve got it set it up has quickly became one of the most powerful configurations I have done.

To start with you’ll need:

  • Domain name
  • Opnsense
  • Cloudflare account

So, what are the benefits? It’s really simple, DDNS tracks your IP address as it changes and then updates cloudflare

Cloudflare

I’m going to assume you already have a Cloudflare account, if not, sign up now.

  1. From your Account Home select your domain name and then DNS and finally Add record.
  2. You’ll need to create the following:
    • Type = A
    • name = ddns
    • ip address = 1.1.1.1 (temporary)

Next we will need to create an API token. Still within Cloudflare:

  1. Select your profile at the top right hand corner of the page, followed by profile
  2. From the menu select API Token and then click Create Token.
  3. Fill in the following details:
    • Permissions
      • Zone –> DNS –> Edit
    • Zone Resources
      • Include –> specific zone –> yourdomain.com
  4. Copy the API key

Opnsense

Install DDNS Plugin

To install the plugin or check that it’s installed browse to your Opnsense IP.

  1. Browse to System –> Firmware –> Plugins
  2. Search for os-ddclient
  3. To install click the + icon. If installed you will have [installed] visible.

Configure DDNS

Browse to Services –> Dynamic DNS –> Settings and click + to begin.

  1. Enter your description, I used domain.ddns
  2. Service = Cloudflare
  3. Password – Your CloudFlare API key
  4. zone = your domain
  5. hostname = ddns.yourdomain.com
  6. check ip method = interface
  7. Interface to monitor = WAN
  8. Force SSL = ticked by default.

Other Settings

within General Settings

  1. Interval = 900 seconds
  2. Backend = ddclient

jay662 Avatar

Published by

Leave a comment