OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: allebone on August 01, 2023, 04:32:43 am

Title: How to use ddns and cloudflare
Post by: allebone on August 01, 2023, 04:32:43 am
On Opnsense Services - Dynamic DNS - Settings.
Click + to add a new entry.

Description : Up to you
Service: Cloudflare
Username: token
Password: API KEY CREATED IN CLOUDFLARE ACCOUNT
Zone: domain name in format example.com
Hostname: Full FQDN in format ddnsentry.example.com
Check IP method: Interface
Interface to monitor : WAN
Check IP Timeout: 10
Force SSL: YES

For API Key in Cloudflare click my profile, then api tokens.
Create token, use DNS template.
Need:
Zone , DNS, Edit
Zone, Zone, Read
Include - All zones.

Copy the API key and paste as the password in Opnsense.

Works 100%

Title: Re: How to use ddns and cloudflare
Post by: 36thchamber on October 22, 2023, 12:00:59 am
Cloudflare is no issue but it cannot select and apply the interface. Painful for multiWAN/multiVPN. Yet another static route play in this solution (as once again firewall is "nothing" and doesn't respect rules).
Title: Re: How to use ddns and cloudflare
Post by: manustar on November 09, 2023, 01:06:35 pm
Hi to all, i configure ddns with "native" backend, but when i select "InterfaceIPv4" for check ip metod (the interface is WAN) i recive this log "no global IP address detected, check config if warning persists".

now i change check ip method in noip-ipv4 and recive "Content for A record must be a valid IPv4 address". in all case the field "current ip" is blank
Title: Re: How to use ddns and cloudflare
Post by: 36thchamber on November 29, 2023, 08:34:47 pm
interface methods give interface IP which is internal IP. Useless.
external methods do check IP from outside, so keep changing the method and "Interface to monitor" until you find one that gives correct IP. In case of VPN, setting interface doesn't work, and static route (once again) is required.
Title: Re: How to use ddns and cloudflare
Post by: mrdannyman on December 17, 2023, 01:09:45 am
Not sure if you got this to work but I was running into something similar. Upon checking logs it would error out because it couldn't find the dns record on cloudflare. I created the record there first, host.yourdomain.com random IP address. I then went back to DDNS setup, selected "IPv4 interface" as method and WAN as interface. Pulled the correct IP and updated it on cloudflare within a few minutes (TTL interval).

Not sure if we have the same exact issues, but this worked for me. Hope it helps.