OpenWRT DDNS: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 39: | Line 39: | ||
====Configuration for Client==== | ====Configuration for Client==== | ||
Below is a working /etc/config/ddns configuration file for DDNS Scripts | Below is a working /etc/config/ddns configuration file for DDNS Scripts (and remember, the dns_server directive / option is NOT needed, just extra, it can be left out, but it depends on the RESOLV.CONF file paths to be working, which can be an issue if using DHCPD instead of DNSMASQ, see above notes) <syntaxhighlight lang="text"> | ||
config ddns 'global' | config ddns 'global' | ||
option ddns_dateformat '%F %R' | option ddns_dateformat '%F %R' | ||
Line 64: | Line 64: | ||
=====Additional Configuration Example for a Router with Dual WAN Capability===== | =====Additional Configuration Example for a Router with Dual WAN Capability===== | ||
The below example assumes the WAN interfaces (OpenWRT perspective, not from ''ifconfig'' perspective) are "wan" and "wwan"<syntaxhighlight lang="text"> | The below example assumes the WAN interfaces (OpenWRT perspective, not from ''ifconfig'' perspective) are "wan" and "wwan", check using IFCONFIG or IP ADDR<syntaxhighlight lang="text"> | ||
config ddns 'global' | config ddns 'global' | ||
option ddns_dateformat '%F %R' | option ddns_dateformat '%F %R' | ||
Line 115: | Line 115: | ||
</syntaxhighlight><br /> | </syntaxhighlight><br /> | ||
**OK. Question. What F*!& does that mean? Hmmm. Let's rephrase: By default, the OpenWRT DDNS Client uses the DNS server for the WAN interface (defined via DHCP or as a 'Custom DNS Server') | **OK. Question. What F*!& does that mean? Hmmm. Let's rephrase: By default, the OpenWRT DDNS Client uses the DNS server for the WAN interface (defined via DHCP or as a 'Custom DNS Server') | ||
**...let's go on and actually give an explanation for what the F$J! it does: | **...let's go on and actually give an explanation for what the F$J! it does: | ||
**Second, the parameter is NOT needed for DDNS to function properly | |||
**If it is used, make sure the RESOLV.CONF file is configured, available, working, etc. (Hint, if one is using DHCPD instead of DNSMASQ, there has been a change as of v21 or v22 of OpenWRT) | |||
*DHCPD and RESOLV.CONF | *DHCPD and RESOLV.CONF | ||
**If one chooses to use a ''full'' DNS Server and a full DHCP Server, such as BIND / NAMED and DHCPD, instead of DNSMASQ (perfectly wonderful, great, compact, fast, DNS Server), some issues arise. See | **If one chooses to use a ''full'' DNS Server and a full DHCP Server, such as BIND / NAMED and DHCPD, instead of DNSMASQ (perfectly wonderful, great, compact, fast, DNS Server), some issues arise. See | ||
*NETCAT "Full Version" VS NETCAT "BusyBox" Version VS NCAT | *NETCAT "Full Version" VS NETCAT "BusyBox" Version VS NCAT | ||
**First issue seems to be that something in OpenWRT v22.x.Whatever breaks NETCAT v0.7.1. Speaking of NETCAT v0.7.1, the version of NETCAT in OpenWRT v22.x.Whatever is the same as OpenWRT v19.0.x, and earlier. OpenWRT's problem? Nope. Netcat appears to have been last updated in 2004 with 0.7.1 being the latest version. So what does OpenWRT do? They do a great job in replacing it with NCAT. And they keep it updated (v7.70 in OpenWRT 19.0.7 and v7.91 in OpenWRT 22.x.Whatever). What they don't do is include a script that creates a symbolic link or overriding or whatever needs to be done to replace the version of NETCAT included with BusyBox. IE, when NETCAT (as in the ancient 0.7.1 version) is installed, that replaces / overrides the BusyBox version of NETCAT. Not so when installing NCAT. Why not? Who knows. The solution is to do it yourself. See | **First issue seems to be that something in OpenWRT v22.x.Whatever breaks NETCAT v0.7.1. Speaking of NETCAT v0.7.1, the version of NETCAT in OpenWRT v22.x.Whatever is the same as OpenWRT v19.0.x, and earlier. OpenWRT's problem? Nope. Netcat appears to have been last updated in 2004 with 0.7.1 being the latest version. So what does OpenWRT do? They do a great job in replacing it with NCAT. And they keep it updated (v7.70 in OpenWRT 19.0.7 and v7.91 in OpenWRT 22.x.Whatever). What they don't do is include a script that creates a symbolic link or overriding or whatever needs to be done to replace the version of NETCAT included with BusyBox. IE, when NETCAT (as in the ancient 0.7.1 version) is installed, that replaces / overrides the BusyBox version of NETCAT. Not so when installing NCAT. Why not? Who knows. The solution is to do it yourself. See | ||
**Best as can be determined is that OpenWRT uses the PATH variable to control whether a BUSYBOX version or 'Full" Command version is used. IE, when a command is run, the /USR/BIN Directory is searched first, if nothing is found, then the BusyBox version of the command is used. Works great, if that's the strategy. The really, really big issue is that unlike when installing the NCAT utility is installed, OpenWRT does NOT create a symbolic link from the NC Command to NCAT, instead leaving the NC symbolic link pointing to the Busybox version of the command. So what should it do? the below; | **Best as can be determined is that OpenWRT uses the PATH variable to control whether a BUSYBOX version or 'Full" Command version is used. IE, when a command is run, the /USR/BIN Directory is searched first, if nothing is found, then the BusyBox version of the command is used. Works great, if that's the strategy. The really, really big issue is that unlike when installing the NCAT utility is installed, OpenWRT does NOT create a symbolic link from the NC Command to NCAT, instead leaving the NC symbolic link pointing to the Busybox version of the command. So what should it do? the below; | ||
***nc > ncat (ln -s /usr/bin/ncat /usr/bin/nc) | ***nc > ncat (ln -s /usr/bin/ncat /usr/bin/nc) | ||
***netcat > ncat (ln -s /usr/bin/ncat /usr/bin/netcat) | ***netcat > ncat (ln -s /usr/bin/ncat /usr/bin/netcat) | ||
***Just so you know, the default is nc > ../../bin/busybox (with busybox NC implied) | ***Just so you know, the default is nc > ../../bin/busybox (with busybox NC implied) | ||