- In order to make sure that our mail server is reachable even if our ISP changes the public-facing IP address, you can leverage OPNSense’s DDNS service with CloudFlare.
- In CloudFlare, create a token that can handle records for your domain:
- Confirm the creation of the token and save it somewhere safe.
- In OPSense, go to Services → Dynamic DNS → Settings → and click on the + sign.
- From the list, choose:
- Service: CloudFlare
- Username: the word ‘token’
- Password: the long token ID that you have received from CloudFlare
- Zone: your domain’s name
- Hostname: the A or CNAME record that you want to edit
- Check ip method – use ‘freedns’
- Once done, click on the ‘Apply’ button and check the Log file under Settings to see that it completed successfully.
- You can even change the IP in CloudFlare to something else and wait 1-2 minutes to see that it changes in CloudFlare. Cool, hmm?