ddns
ddns copied to clipboard
docs update - how to update IP on openwrt
Hi! Thanks for this great project (and service). This issue is actually only for documentation purposes. Maybe there could be a place (in readme or wiki) for additional ddns client configuration docs.
I'm using OpenWRT for my router and wanted to update WAN IP on pboehm/ddns service as soon as possible and to avoid running cron job every X minutes to check if IP changed.
After some research I've found in OpenWRT forums those two relevant topics:
- https://forum.openwrt.org/t/ddns-scripts-why-are-they-so-huge/56376
- https://forum.openwrt.org/t/udhcpc-user-script-documentation-and-how-to-hotplug-for-dhcp-events/47952
Basically what you have to do is:
- Make sure you have wget with SSL support
opkg install wget ca-certificates
- Create a file
/etc/udhcpc.user
with following contents
#!/bin/sh
if [ "wan" = $INTERFACE ]; then
logger "$INTERFACE - $interface - $J_T5_source"
/usr/bin/wget -q -O - 'https://ddns.pboehm.de/update/[HOST]/[TOKEN]?myip='${ip}''
fi
exit 0
- Make it executable
chmod +x /etc/udhcpc.user
That's it!
I didn't find the myip-param in docs or the source. Is there such a parameter with ddns? I looked for this to have placeholders for IPv4 + IPv6 - in case the FritzBox wants to set both IPs (no matter that the ddns-hostname resolves to and which IP is automatically returned from the request).