In fact, on the router we can see vim /etc/init.d/gl_ddns
, here is the main call
PROG=/usr/lib/gl_ddns/dynamic_dns_updater.sh
(Why is the variable not used later in the script?)
We go on with vim /usr/lib/gl_ddns/dynamic_dns_updater.sh
.
The url could be in /usr/share/gl_ddns/custom
or /usr/share/gl_ddns/default
.
root@GL-xnnnn:~# cat /usr/share/gl_ddns/custom
cat: can't open '/usr/share/gl_ddns/custom': No such file or directory
I expected this on a fresh factory reset system.
root@GL-xnnnn:~# cat /usr/share/gl_ddns/default/glddns.com.json
{
"name": "glddns.com",
"ipv4": {
"url": "get_ddns_post_cmd.lua"
},
"ipv6": {
"url": "get_ddns_post_cmd.lua"
}
}
okay, it seems to contact glddns.com ... could you ping this address?
The file get_ddns_post_cmd.lua
is binary ... So we should get enough information with strings /usr/lib/gl_ddns/get_ddns_post_cmd.lua | grep -i http
. Only the URL are of interest, therefor the grep will filter the results.
Because the first URL is a 404, I think the second one is the one for the curl command. See:
┌──(lupus㉿rea)-[~]
└─$ curl https://ddns.glddns.com/nic/no-tls/update
404 page not found
┌──(lupus㉿rea)-[~]
└─$ curl https://ddns-tls.glddns.com/nic/tls/update
<html>
<head><title>400 No required SSL certificate was sent</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>No required SSL certificate was sent</center>
<hr><center>openresty/1.25.3.1</center>
</body>
</html>
Even if it would be interesting to add the certificate and so in in the curl request, I think the issue is before that.
Just try curl https://ddns-tls.glddns.com/nic/tls/update
on the router and/or on any system you have at hand with a curl client.
With curl https://ddns-tls.glddns.com/nic/tls/update --verbose
we get more than an 'Error 7'. Interesting are any kind of SSL errors. In that case the expected/allowed cert is not matching the given server certificate. So any system within the network is trying to break the ssl.
See. Easy to debug 