From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: ddns@lists.ipfire.org Subject: Re: Passing key algo to nsupdate Date: Mon, 04 Apr 2022 10:11:59 +0100 Message-ID: In-Reply-To: <1985172.IPymiuymL7@haiash> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8929165986691399176==" List-Id: --===============8929165986691399176== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Adrian, Thank you for looking into this. We really would like some help to improve dd= ns. > On 3 Apr 2022, at 13:15, Adrian Zaugg wrote: >=20 > Hi there >=20 > After some digging in the code I found some Problems with the ddns componen= t=20 > of IPFire and especially with the nsupdate provider. The main thing which=20 > renders the nsupdate provider unusable, I reported under Bug #12837 [1]. It= =20 > seems to me there are more problems, but since I don't use IPFire, I do not= =20 > feel to get involved to much. Generally, the UI does not have good support for nsupdate, since we did not w= ant to add any extra fields. This method is not very popular and since we wan= ted to release ddns, we skipped changing the UI and never revisited this. However, it should work if you write the correct configuration by hand. > It seems to me that the scriptlet the nsupdate provider produces is missing= =20 > the "update" commands. It connects, authenticates and saves, but does not p= ass=20 > any information to the server. A generated scriptlet for nsupdate should lo= ok=20 > like this: >=20 > server $SERVER > zone $ZONE > update delete $HOSTNAME $RR > update add $HOSTNAME $TTL $RR $IP > send >=20 > ...where:=20 > $SERVER is the name server to send the record update/ deletion > $ZONE is the domain in which to update the host record > $HOSTNAME is the dynamic host's FQDN > $TTL is the time to live value for the record > $IP is the numerical IP address of the dynamic host > $RR is the record type, "A" for an IPv4, "AAAA" for an IPv6 host address >=20 > If I watch the debug output of ddns I do not see the update command being=20 > sent. I did not check this good enough to report a bug. This scriptlet looks good and in theory is what ddns generates and sends to n= supdate: https://git.ipfire.org/?p=3Dddns.git;a=3Dblob;f=3Dsrc/ddns/providers.py;h=3D5= b2a82d1b727172c2011574277988977b8013db0;hb=3DHEAD#l507 It can happen that no update line is generated if the system cannot find its = own IP address. So the problem is not in support for nsupdate, it is that this function is no= t returning a valid result: https://git.ipfire.org/?p=3Dddns.git;a=3Dblob;f=3Dsrc/ddns/system.py;h=3D73a2= 7a5cd0b56484feda70006b3ba4065e11e0c8;hb=3DHEAD#l281 This will cause other methods that cannot detect your IP address automaticall= y to fail, too. What do you get when you run this command: ddns guess-ip-addresses > The whole provider does not work at all and the code in the ddns seems half= =20 > baken to me. I started to report bugs, but I gave up, when I saw, that it=20 > nsupdate doesn't work at all. So if some one corrects the code and tests it= =20 > (who actually knows to code in Python unlike me), those deficiencies should= =20 > get discovered anyway. I hope I could help with some bug reports against th= e=20 > ddns core and the hint in this mail here. >=20 > Best regards, Adrian. >=20 > [1] https://bugzilla.ipfire.org/show_bug.cgi?id=3D12837 > _______________________________________________ > ddns mailing list > ddns(a)lists.ipfire.org > https://lists.ipfire.org/mailman/listinfo/ddns --===============8929165986691399176==--