Replies: 4 comments
-
|
Also of note, it doesn't seem the default inadyn client/web setup processes custom input parameters/tokens correctly, so this is (unfortunately) sorely needed IMO. |
Beta Was this translation helpful? Give feedback.
-
|
To anyone running Unifi OS 3.x / Since the persistent folder is now |
Beta Was this translation helpful? Give feedback.
-
|
Minor: using To remove this use |
Beta Was this translation helpful? Give feedback.
-
|
#
# Setup inadyn ddns using systemd-run
#
SCRIPT_FILE=/data/on_boot.d/20-inadyn-custom.sh # For Unifi OS 3.x
CONFIG_FILE=/run/ddns-ppp0-inadyn-custom.conf
cat > $SCRIPT_FILE <<EOF
#!/bin/sh
CONFIG_FILE=$CONFIG_FILE
# Rebuild config file
cat > $CONFIG_FILE <<- 'INNER_EOF'
# Created by $SCRIPT_FILE
iface = ppp0
provider cloudflare {
username = "MY_DOMAIN.com"
password = "MY_APIKEY"
hostname = "MY_HOST.MY_DOMAIN.com"
}
INNER_EOF
# Start transient service
systemd-run --unit=inadyn-custom-ppp0.service --description='Inadyn Dynamic DNS Client [ppp0]' /usr/sbin/inadyn -n -s -C -f $CONFIG_FILE --no-pidfile
EOF
chmod +x $SCRIPT_FILETo check the service status: systemctl status inadyn-custom-ppp0To see the output logs: journalctl -u inadyn-custom-ppp0 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem: UDM-PRO internally uses Inadyn ddns client but the UI configuration offer very few DDNS providers:
As probably every other UDM-PRO customer out there, I waited patiently for Ubiquiti to provide me an update for this, which never happened. Of course, Ubiquiti surely have more important priorities like making a VR mobile app instead of adding real-world needed features (such load balancing or custom DNS records) into their 400.00 USD router.
So... Rants aside, I made this script to update my Cloudflare DDNS using Inadyn.
Just paste the script below, replacing
MY_DOMAIN,MY_APIKEYandMY_HOSTwith appropriate values.This will create a
/mnt/data/on_boot.d/20-inadyn-custom.shscript which will start a secondinadynclient. It uses a custom configuration file (recreated after each UDM reboot) and a custom PID file to not clash with the defaultinadynmanaged by UDM firmware.This setup is for Cloudflare but it can be used for any Inadyn supported providers.
Opinions, suggestions and criticisms are welcome.
Beta Was this translation helpful? Give feedback.
All reactions