OpenWrt Forum Archive

Topic: luci-app-ddns / ddns-scripts : I'm working on enhancements

The content of this topic has been archived between 23 Mar 2018 and 4 May 2018. Unfortunately there are posts – most likely complete pages – missing.

First one seems better thank you.

kpv wrote:
chris5560 wrote:

Hi,
because the overall minimum is BusyBox's Wget, the --bind-address parameter is not the solution.
Here some questions for my understanding:
- if you configure ADSL with 3G backup are both interfaces "UP" or only "WAN" connected via one of them ?
- If both interfaces are "UP" each of them has a seperate IP?
- Do you want to have both addresses registered at DDNS provider, or only the one doing the traffic ?

I understand that the limited wget supplied as part of busybox doesn't allow to bind to a specific address, but the "full" version of both wget and curl do.

Regarding your other questions:
- Both interfaces (wan, wan2) will be "up" all the time
- Each interface (wan, wan2) has a separate IP.
- Both addresses need to be registered (each with its own fqdn obviously) at the DDNS provider

Btw I did some very quick tests and it seems that even when invoking wget with "-bind-address" I'd still need to create a mwan3 policy route for this scenario to work ...

Hi again after some time,

I've verified that curl will indeed send traffic via a specific interface, allowing me to register different ddns names for each WAN in a multi-WAN system:

Syntax is actually very simple:

curl --interface eth0.3 --ipv4 http://.../test.html
curl --interface `uci get -p /var/state network.wan.ifname` --ipv4 http://.../test.html

Without this, I couldn't get ddns to register different WANs on a multi-WAN system (it'd just flip-flop according to load-balancing algo).

Hi,
could we continue on this via direct mail?
Have a look into script headers for my mail.
Please send me your ddns config and logs so I can have a look.
Christian

Hi,

uci get -p /var/state network.wan.ifname

This is deprecated, I wouldn't rely on it. Use the functions from /lib/functions/network.sh for determining the device.

HI. Where are we on this enhancement? We use namecheap DNS services and we would like openWRT to update both A and AAAA records. openWRT is updating the A record (IPv4) but would also like it to update the AAAA record (IPv6).

It's up and running inside trunk. Current version 2.3.0-1.
Also luci-app-ddns avaiiable at trunk supporting all (new) settings.
UCI config documentation at http://wiki.openwrt.org/doc/uci/ddns
Special scripts for CloudFlare and No-IP.com
Feel free to test. Feedback welcome.

Hi, I have version 2.4.0-1 and with DuckDns it does not work. The problem is with the DOMAIN setting, because the script performs a nslookup you have to include full domain (my domain.duckdns.org) to obtain the RegisteredIP but the URL used to update the IP on DuckDNS requires the domain without the ".duckdns.org" part.

Is there any option to sort this out and make it working with DuckDns?

Thanks in advance.

Hi,
try to modify your custom_url like this:
"http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP]"
(without quotes) and then set:
option domain to your FQDN
option username to your host without ".duckdns.org"
option password to your token

please give me feedback so I can correct the DDNS Client WIKI page.
Thanks
Christian

It's working OK! With this change now works perfect with DuckDNS.

Regards.

chris5560 wrote:

Hi,
try to modify your custom_url like this:
"http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP]"
(without quotes) and then set:
option domain to your FQDN
option username to your host without ".duckdns.org"
option password to your token

please give me feedback so I can correct the DDNS Client WIKI page.
Thanks
Christian

is it possible to have ddns-scripts to check if the ip changed when the interface reloads? for instance when the pppoe connection drops and then comes up again, have ddns-scripts to update the ip imediatly instead of waiting for a certain period of time?

Normally ddns-scripts is configured with "option interface" to the interface/network that toggle. If Interface goes up ddns-scripts restarts and check it's IP and send update if needed.
This works for ddns-scripts of OpenWrt BB 14.07 or later.

So, it's the same to read the ip from network-> wan or interface-> pppoe-wan ?

Hi every body,
Please I'm looking for a suitable OpenWrt image for ACME-Aria G25 Hardware.
How can I get working version to this Hardware ?

Thanks for your time ..

@finas
Reading your IP from network "wan" or interface "pppoe-wan" should be the same if the interface belongs to "wan" network.

@firas.om
looking for hardware dependent image on a software package task ? Hope you post it also in a separate task.

chris5560 wrote:

@firas.om
looking for hardware dependent image on a software package task ? Hope you post it also in a separate task.

Sorry for that ..

Could you please guide me where to get response for this issue !

Thanks for your time ..

@firas.om
create a new post in the forum

I'm running OpenWrt Barrier Breaker 14.07 / LuCI Trunk (0.12+svn-r10530)
on a TP-Link TL-WR841N/ND v9

I am unable to obtain the luci luci-app-ddns package or the ddns-scripts package

It is not showing up in the Available package list and also reports when put in the Download and install package:
Unknown package 'luci-app-ddns'.

Same for ddns-scripts

Other packages seem to be available however so it seems to not be the opkg interface.

What is going wrong here and how do I get the ddns?

thanks
oldunixguy

If you follow the link for your hardware in the download directory http://downloads.openwrt.org/barrier_breaker/14.07/ you should find
../packages/luci/luci-app-ddns_0.12+svn-r10530-1... and
../packages/packages/ddns-scripts_1.0.0-23_all.ipk
are they on the download server for your hardware ?
Did you update the package lists ?
Are there any errors when running "opkg update" from console ?

>> If you follow the link for your hardware in the download directory
>> http://downloads.openwrt.org/barrier_breaker/14.07/ you should find

>> ../packages/luci/luci-app-ddns_0.12+svn-r10530-1... and
>> ../packages/packages/ddns-scripts_1.0.0-23_all.ipk
>> are they on the download server for your hardware ?

No

>> Did you update the package lists ?

Yes, several times but never do either "luci-app-ddns" or "ddns-scripts" appear on the list.

If I go to Luci->System-Software and select the Configuration tab
Here is the opkg config screen for which I have not changed at all:
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_br … kages/base
src/gz barrier_breaker_luci http://downloads.openwrt.org/barrier_br … kages/luci
src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_br … s/packages
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_br … es/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_br … /telephony
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_br … management
src/gz barrier_breaker_oldpackages http://downloads.openwrt.org/barrier_br … ldpackages

If I go to Luci->System-Software and select the Status->Available Packages tab
and enter "luci" in the search anumber of luci packages appear but not any with luci-app-ddns

Same happens for ddns-scripts

If I enter the full package name into the "Download and install package" box I get this:

Unknown package 'luci-app-ddns_0.12+svn-r10530-1'.
Collected errors:
* opkg_install_cmd: Cannot install package luci-app-ddns_0.12+svn-r10530-1.

and this for the short name luci-app-ddns:

Unknown package 'luci-app-ddns'.
Collected errors:
* opkg_install_cmd: Cannot install package luci-app-ddns.


>> Are there any errors when running "opkg update" from console ?

when I run this from the console I get no errors:
Downloading http://downloads.openwrt.org/barrier_br … ckages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_base.
Downloading http://downloads.openwrt.org/barrier_br … ckages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_luci.
Downloading http://downloads.openwrt.org/barrier_br … ckages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_packages.
Downloading http://downloads.openwrt.org/barrier_br … ckages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_routing.
Downloading http://downloads.openwrt.org/barrier_br … ckages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_telephony.
Downloading http://downloads.openwrt.org/barrier_br … ckages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_management.
Downloading http://downloads.openwrt.org/barrier_br … ckages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_oldpackages.

and these 2 packages still never show up in luci windows.

However, YOU HAVE HELPED ME WORK AROUND IT!

If from the command line I do
opkg install luci-app-ddns

the packages both get installed!!! This is the first time this has been tried since I usually only use the Luci interface.

So, something is wrong with the Luci interface. The command line works.

Going back to Luci and showing the installed packages it now shows the 2 new ddns ones.

So there is a bug some place that prevents Luci from getting the ddns packages.

thanks
oldunixguy

For me it looks like a browser cache problem, because LuCI is using opkg command options to build the list.
Clear browser cache and search for "ddns" in the available package list, it should be there (Because packages are installed each should be twice)
On with description and one without.

Problems with dnsomatic.com / opendns.

I have used 14.07 Openwrt to update with opendns in the past. But with 15.05 I can't get this version to work. I see others on this forum detail this problem but I can't see a solution.

I have the free single network with opendns (dnsomatic.com) and can update via wget (ssl) ok. It does not seem to matter what NAME or network I use in the wget cmd. As long as I have credentials that match it reports update OK.

Doing this to filter  porn sites (etc) for our Scout Hall.
I have an Netgear WNDR4300 with 15.05 loaded.
* installed wget (with ssl)
* installed ddns-scripts and luci-app-ddns
* installed openssl-util
* installed ca-certificates

When I used the ddns updater I get an error when nslookup try's to find my opendns 'network' (ie [DOMAIN] field). But as opendns does not provide an fqdn this fails.

I've see another's solution to this is to just 'cron' the wget cmd. But I think that it would be better /nicer to have this 'inside' ddns.

Can anyone offer a ddns solution to this ?

Some Log file.
121758       : ************ ************** ************** **************
121758  note : PID '3407' started at 2015-10-21 12:17
121758       : uci configuration:
ddns.OpenDNS_ipv4.cacert='/etc/ssl/certs'
ddns.OpenDNS_ipv4.check_interval='10'
ddns.OpenDNS_ipv4.check_unit='minutes'
ddns.OpenDNS_ipv4.domain='MY-Network'
ddns.OpenDNS_ipv4.enabled='1'
ddns.OpenDNS_ipv4.force_interval='72'
ddns.OpenDNS_ipv4.force_unit='hours'
ddns.OpenDNS_ipv4.interface='wan'
ddns.OpenDNS_ipv4.ip_source='web'
ddns.OpenDNS_ipv4.ip_url='http://myip.dnsomatic.com'
ddns.OpenDNS_ipv4.password='My-PWD'
ddns.OpenDNS_ipv4.retry_count='10'
ddns.OpenDNS_ipv4.retry_interval='60'
ddns.OpenDNS_ipv4.retry_unit='seconds'
ddns.OpenDNS_ipv4.update_url='http://[USERNAME]:[PASSWORD]@updates.opendns.com/nic/update?hostname=[DOMAIN]&myip=[IP]'
ddns.OpenDNS_ipv4.use_https='1'
ddns.OpenDNS_ipv4.use_logfile='1'
ddns.OpenDNS_ipv4.use_syslog='1'
ddns.OpenDNS_ipv4.username='user@some.domain.somewhere'
ddns.OpenDNS_ipv4=service
121759       : ddns version  : 2.4.3-1
121759       : verbose mode  : 0 - run normal, NO console output
121759       : check interval: 600 seconds
121759       : force interval: 259200 seconds
121759       : retry interval: 60 seconds
121759       : retry counter : 10 times
121759       : No old process
121759       : last update: never
121759       : Detect registered/public IP
121759       : #> /usr/bin/nslookup MY-Network  >/var/run/ddns/OpenDNS_ipv4.dat 2>/var/run/ddns/OpenDNS_ipv4.err
121759 ERROR : BusyBox nslookup error: '1'
121759       : nslookup: can't resolve 'MY-Network': Name or service not known
121759       : Detect registered/public IP
121759       : #> /usr/bin/nslookup MY-Network  >/var/run/ddns/OpenDNS_ipv4.dat 2>/var/run/ddns/OpenDNS_ipv4.err
121759 ERROR : BusyBox nslookup error: '1'
121759       : nslookup: can't resolve '18forrest': Name or service not known
121759  WARN : Get registered/public IP for 'MY-Network' failed - retry 1/10 in 60 seconds
121859       : #> /usr/bin/nslookup 18forrest  >/var/run/ddns/OpenDNS_ipv4.dat 2>/var/run/ddns/OpenDNS_ipv4.err
121859 ERROR : BusyBox nslookup error: '1'
121859       : nslookup: can't resolve 'MY-Network': Name or service not known

Every host inside DNS needs FQDN https://en.wikipedia.org/wiki/Fully_qua … omain_name so "18forrest.example.com" is the FQDN.
You only give "18forrest" without "example.com" into the [DOMAIN] field and nslookup must fail.
You normally not calling your host only by "18forrest" from the web, you call "18forrest.example.com".

The handling of [DOMAIN] field was not changed since OpenWrt 10.03 release; a better monitoring was implemented in 15.05.
In the past you never see nslookup problems and fire an update to your ddns-provider every x seconds without need, because the script thought IP has changed.

Christian

Hi Christian, and thanks for the reply. Yes I understand this. And I see it fail.

_but_ opendns / dnsomatic (seems to be same place) provide dns servers that that can be useful (reduce my management of firewall rules) to help limit access to unwanted sites (ie porn).

To do this you register a 'name' /entry with them. But this entry is not 'searchable' via dns. I think it's used to access what sites you have block (filtered). So when the IP address 'attached' or linked to that entry does a query the response is filtered before being returned.

So you still need to 'update' your current IPv4 Nat'ed address with them, but can't use an fqdn to check it current address, cos it won't get found.

Like I said i have used the ddns in 14.07 to do these updates, but there are changes in 15.05 that have changed behaviour and the 'old' scripts I had don't work now.

This wget cmd DOES update the opendns entry, so I will just cron it for now. Interestingly the 18forrest can be any text in the testing I've done. So the update is done with the userid and pwd (at least for this 'free' account that only has one entry/network).

wget --user user@some.domain.somewhere --password some-pwd http://updates.opendns.com/nic/update hostname=18forrest


chris5560 wrote:

Every host inside DNS needs FQDN https://en.wikipedia.org/wiki/Fully_qua … omain_name so "18forrest.example.com" is the FQDN.
You only give "18forrest" without "example.com" into the [DOMAIN] field and nslookup must fail.
You normally not calling your host only by "18forrest" from the web, you call "18forrest.example.com".

The handling of [DOMAIN] field was not changed since OpenWrt 10.03 release; a better monitoring was implemented in 15.05.
In the past you never see nslookup problems and fire an update to your ddns-provider every x seconds without need, because the script thought IP has changed.

Christian

(Last edited by shdashley on 22 Oct 2015, 15:13)

OK you need to update your IP for a service having nothing to do with (Dynamic)DNS.
So doing a DNS call i.e. nslookup must fail because DNS is not updated.

As I said the handling of the DOMAIN parameter was not changed.
But if you cannot "nslookup" you can't send an update. That's the change.

Because ddns-scripts are designed for DynamicDNS, I think the best practice for you is to stay with wget via cron.

Other option is to combine your used filter functionality with opendns/dnsomatic DynamicDNS service if possible.
Than you are back inside ddns-scripts functionality.
Updating DynamicDNS possibly also updating your filter functionality ?! Sorry I'm not familiar with dnsomatic/opendns services.

Christian

OK, Thank you for the explanation.

For me (at home) I don't need the opendns service (porn is not of interest to me). But as I'm sure you understand, for a community location like our Scout Hall. And as the person managing the Internet there, I need to control (ie duty of care for the kids/youth) how or what 'might' be able to be 'seen' or accessed. For users with basic knowledge opendns works. A more knowledgeable user will understand how to select another DNS provider and get around this filter. Yes its not a complete solution.

For the moment the cron job will work fine.

Cheers.

chris5560 wrote:

OK you need to update your IP for a service having nothing to do with (Dynamic)DNS.
So doing a DNS call i.e. nslookup must fail because DNS is not updated.

As I said the handling of the DOMAIN parameter was not changed.
But if you cannot "nslookup" you can't send an update. That's the change.

Because ddns-scripts are designed for DynamicDNS, I think the best practice for you is to stay with wget via cron.

Other option is to combine your used filter functionality with opendns/dnsomatic DynamicDNS service if possible.
Than you are back inside ddns-scripts functionality.
Updating DynamicDNS possibly also updating your filter functionality ?! Sorry I'm not familiar with dnsomatic/opendns services.

Christian

The discussion might have continued from here.