Bug 28629 - DDClient uses other clients than the ones specified in ddclient.conf
Summary: DDClient uses other clients than the ones specified in ddclient.conf
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Chris Denice
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-22 15:39 CET by christian barranco
Modified: 2021-11-29 18:30 CET (History)
1 user (show)

See Also:
Source RPM: ddclient-3.9.1-1.mga8
CVE:
Status comment:


Attachments
ddclient.conf (8.22 KB, text/x-matlab)
2021-03-22 15:43 CET, christian barranco
Details

Description christian barranco 2021-03-22 15:39:07 CET
Description of problem:
DDClient seems to query other dynamic DNS providers than the ones stated in the /etc/ddclient/ddclient.conf

Version-Release number of selected component (if applicable): 
ddclient-3.9.1-1.mga8


How reproducible: always


Steps to Reproduce:
1. urpmi ddclient
2. Edit /etc/ddclient/ddclient.conf and add the dynamic DNS provider (infomaniak in my case)
3. ddclient -query
4. You get :
 __
| use=if, if=enp0s31f6 address is 192.168.1.20
|use=if, if=lo address is 127.0.0.1
|WARNING:  found neither ipv4 nor ipv6 address
|use=if, if=wlp4s0 address is NOT FOUND
|WARNING:  cannot connect to ipdetect.dnspark.com:80 socket: IO::Socket::INET: |Bad hostname 'ipdetect.dnspark.com'
|WARNING:  found neither ipv4 nor ipv6 address
|use=web, web=dnspark address is NOT FOUND
|use=web, web=dyndns address is 176.172.101.154
|use=web, web=loopia address is 176.172.101.154
|use=web, web=https://ipv4.infomaniak.com/ip.php address is 176.172.101.154
 __

However, you will see that in my ddclient.conf all DNS provider (dnspark, dyndns, loopia) are commented but infomaniak.

I had in mind that /etc/ddclient/ddclient.conf should be the file stating which provider to use.
Or, am I wrong?
Comment 1 christian barranco 2021-03-22 15:43:10 CET
Created attachment 12494 [details]
ddclient.conf

ddclient configuration I use. I removed confidential info like id, password,...
Comment 2 Lewis Smith 2021-03-23 21:31:22 CET
Thank you for the report. It looks strange (yet may be 'normal').

Certainly dnspark, dyndns, loopia are commented out in the conf file - along with a mass of other entries. Why one should give NOT FOUND, and the other two the IP address common for Infomaniak ?
(In fact I could not ping 176.172.101.154; ping ipv4.infomaniak.com yielded 
185.125.25.1).

Assigning this to ChrisD for this SRPM.

Assignee: bugsquad => eatdirt

Comment 3 Dave Hodgins 2021-03-24 07:21:10 CET
I suspect this is may be a lack of documentation issue.

When run with the -query option it appears to be checking it's known providers
to see which ones work, and then showing the entries that should be used in
ddclient.conf for those providers.

When run as "/usr/sbin/ddclient -daemon 300", as is normally done by
/lib/systemd/system/ddclient.service with the option specified in
/etc/sysconfig/ddclient, then it's only using the service configured in
ddclient.conf.

So in daemon mode it's using ddclient.conf. In normal mode, it's using all
the hard coded providers it knows about.

I checked to see what its doing in daemon mode by running it under strace,
and confirmed it's only using ...
write(4, "GET /checkip HTTP/1.0\r\nHost: myonlineportal.net\r\nUser-Agent: ddclient/3.9.0\r\nConnection: close\r\n\r\n\r\n", 100) = 100
and getting ...
read(4, "HTTP/1.0 200 OK\r\n\r\n135.23.236.153", 8192) = 33

In ddclient.conf, I have ...
protocol=dyndns2
use=web web=myonlineportal.net/checkip
server=dynupdate.no-ip.com
login=davidwhodgins
password=munged
davidwhodgins.no-ip.biz
ssl=yes

With the correct password.

CC: (none) => davidwhodgins

Comment 4 christian barranco 2021-03-24 08:28:29 CET
Thanks all.

@Lewis : the IP you pinged is mine and it is not allowed on my server.

@Dave : thank you for the explanation. It explains why then. It is not a bug then. Indeed, documentation could be improved :)

Sorry for digressing a bit, but how did you run the daemon under trace mode? 

/usr/sbin/ddclient -daemon 300 returns nothing on on my side.
Comment 5 Chris Denice 2021-03-24 10:01:00 CET
Cannot reproduce, works for me.

Try removing the double ssl=yes in your config file, as well as the continuation character here -->

use=web, web=https://ipv4.infomaniak.com/ip.php, web-skip='IP:',\
Comment 6 Dave Hodgins 2021-03-24 11:27:43 CET
(In reply to christian barranco from comment #4)
> Sorry for digressing a bit, but how did you run the daemon under trace mode? 
> /usr/sbin/ddclient -daemon 300 returns nothing on on my side.

In a konsole shell after using "su -" to become root ...
# systemctl stop ddclient.service
# touch /var/cache/ddclient/ddclient.cache
# strace -f -s 512 -ostrace.txt /usr/sbin/ddclient

Then wait 5 minutes for it to update the ip address. After that use ctrl+c
to kill the running ddclient, and start the ddclient.service again.
Comment 7 Dave Hodgins 2021-03-24 11:33:23 CET
Oops. That last line run was ...
# strace -f -s 512 -ostrace.txt /usr/sbin/ddclient -daemon 300

Of course you can reduce the time while testing. I chose to use the normal
default during my test.
Comment 8 christian barranco 2021-11-27 17:07:48 CET
(In reply to christian barranco from comment #4)
> Thanks all.
> 
> @Lewis : the IP you pinged is mine and it is not allowed on my server.
> 
> @Dave : thank you for the explanation. It explains why then. It is not a bug
> then. Indeed, documentation could be improved :)
> 
> Sorry for digressing a bit, but how did you run the daemon under trace mode? 
> 
> /usr/sbin/ddclient -daemon 300 returns nothing on on my side.

Hi
should this report be closed then?
Comment 9 Dave Hodgins 2021-11-29 18:30:02 CET
Closing

Status: NEW => RESOLVED
Resolution: (none) => INVALID


Note You need to log in before you can comment on or make changes to this bug.