Install packages
- Login to you router
- Go to [System] -> [Software]
- In {Actions} tab, click the <Update lists> button
- Install the following packages
luci-app-ddns
- Will auto install
ddns-scripts
- Will auto install
ddns-scripts_cloudflare.com-v4
- Will auto install
ca-bundle
libcurl
curl
- Will auto install
Settings for CloudFlare
For example, I have a domain called ‘myabc.com’ and would like to have a DDNS ‘myRouter.myabc.com’ to point to my router.
Setup a zone in CloudFlare
- Login to your CloudFlare account
- Go to your domain, in my example it will be ‘myabc.com’
- Go to [DNS]
- Click <+Add record>
- In {Type} field select:
A
- In {Name} field input:
myRouter
- In {IPv4 address} field input a random IP first
- Click <Save> button
- Go to [My Profile]
- Go to {API Tokens} tab
- Go to {API Keys} section
- Click the <View> button at {Global API Key}
- Copy that API key and it will in used in the next section
Add DDNS entry in OpenWRT
- Go to [Services] -> [Dynamic DNS]
- In section {Overview} -> {Basic} tab
- In drop down menu {DDNS Service provider [IPv4]}:
cloudflare.com-v4
- Go to input field and input
myRouter_myabc_com
- Click <Add> button and it will go into the details page
- Ensure {Enabled} field:
Marked with tick
- In {Lookup Hostname} input field:
myRouter.myabc.com
- In {IP address version} select:
IPv4-Address
- In {Domain} field in put your domain with a @ character:
myRouter@myabc.com
- In {Username} field:
your username for login CloudFlare, ie: myEmail@gmail.com
- In {Password} field:
The Global API Key from CloudFlare
- In section {Overview} -> {Advanced Settings} tab
- In {URL to detect [IPv4]} field
http://checkip.dyndns.com
- In {Event Network [IPv4]} field
wan
- Click <Save & Apply> button