OpenWRT DDNS: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 5: | Line 5: | ||
https://openwrt.org/docs/guide-user/services/ddns/client | https://openwrt.org/docs/guide-user/services/ddns/client | ||
=== Rough Notes === | ===Rough Notes=== | ||
To get it to work properly, below is an example of a router with two WAN connections to the internet where both interfaces are behind other routers (IE, the router with the DDNS service has local IP Addresses assigned to its WAN interfaces);<syntaxhighlight lang="text"> | To get it to work properly, below is an example of a router with two WAN connections to the internet where both interfaces are behind other routers (IE, the router with the DDNS service has local IP Addresses assigned to its WAN interfaces);<syntaxhighlight lang="text"> | ||
config ddns 'global' | config ddns 'global' | ||
| Line 39: | Line 39: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Use the ''option use_curl '1''' directive when using DDNS with a Dual WAN Router | *Use the ''option use_curl '1''' directive when using DDNS with a Dual WAN Router | ||
* If the router with the DDNS functionality is behind another router (like a hotspot, etc.), then the following directives should be configured for proper functionality; | *If the router with the DDNS functionality is behind another router (like a hotspot, etc.), then the following directives should be configured for proper functionality; | ||
** use_curl '1' | **use_curl '1' | ||
** interface 'WhatEverInterface' (not the "ifconfig" or "ip a" name, but the OpenWRT Name found in the LuCI GUI, Network, Interfaces)* | **interface 'WhatEverInterface' (not the "ifconfig" or "ip a" name, but the OpenWRT Name found in the LuCI GUI, Network, Interfaces)* | ||
** ip_source 'web' | **ip_source 'web' | ||
** ip_url 'WhatEverServiceLikeGoogle' | **ip_url 'WhatEverServiceLikeGoogle' | ||
** bind_network 'WhatEverInterface' (not the "ifconfig" or "ip a" name, but the OpenWRT Name found in the LuCI GUI, Network, Interfaces)* | **bind_network 'WhatEverInterface' (not the "ifconfig" or "ip a" name, but the OpenWRT Name found in the LuCI GUI, Network, Interfaces)* | ||
** ...and his requires CURL be installed: opkg install curl | **force_ipversion '1' | ||
**...and his requires CURL be installed: opkg install curl | |||
<nowiki>*</nowiki> In the above example, wan1 and wan2 are just place holders. In real world circumstances, wan, wwan, etc. would be used, NOT eth1.2 | <nowiki>*</nowiki> In the above example, wan1 and wan2 are just place holders. In real world circumstances, wan, wwan, etc. would be used, NOT eth1.2 | ||
| Line 53: | Line 54: | ||
Some good hints came from here: https://github.com/openwrt/packages/issues/8277 | Some good hints came from here: https://github.com/openwrt/packages/issues/8277 | ||
=== DDNS and BIND (IE, ditching a service like DynDNS) === | |||
opkg update | |||
opkg install wget curl bind-client bind-host ddns-scripts_nsupdates | |||
https://openwrt.org/docs/guide-user/services/ddns/client | |||
https://bind9.readthedocs.io/en/v9_16_5/advanced.html | |||
https://bind9.readthedocs.io/en/v9_16_5/manpages.html#man-nsupdate | |||
Nice example, but without using the OpenWRT DDNS service (uses a custom script): https://www.foell.org/justin/diy-dynamic-dns-with-openwrt-bind/ | |||
https://www.leurent.eu/wiki/FAQ:OpenWRT | |||