OpenWRT Dynamic DNS CloudFlare orange cloud

Installing ddns-scripts and ddns-scripts_cloudflare version 2.4.3-1 from OpenWRT package repository allows you to configure dynamic DNS that points directly to your IP address without orange cloud. If you want the orange cloud however, you need to make a small change.

CloudFlare gray vs orange cloud

Quoted from CloudFlare support page:

An orange cloud means your web traffic is running through CloudFlare making your site faster, safer and smarter. A gray cloud means your web traffic is not running through CloudFlare.

If you want your CloudFlare to behave like any other dynamic DNS (DDNS) provider, you would need the color gray cloud option which is the default behaviour of the ddns-scripts_cloudflare as per version 2.4.3-1.

If you want the orange cloud however, you need to make a small change in /overlay/upper/usr/lib/ddns/update_CloudFlare.sh

What to change

Edit that file, scroll to the bottom of the file:

__URL="${__URL}&service_mode=0"

Change it to:

__URL="${__URL}&service_mode=1"

Security tip

For better security, do not setup a gray cloud on a subdomain pointing to your direct IP address if you are using orange cloud on the Top-Level-Domain (TLD) or the standard www subdomain for the same domain. The former subdomain is your weak point for incoming attacks if discovered.