How do I contribute to the __native__ (python) implementation of ddclient

Started by Jjabba, July 09, 2024, 09:14:47 PM

Previous topic - Next topic
I'm looking to contribute by adding support for 'dynadot.com' to the native python ddclient implementation mentioned here https://docs.opnsense.org/manual/dynamic_dns.html#general-settings.

From searching the forum I found indications that the native python implementation resides inside the os-ddclient plugin code base.

Could anyone point me in the right direction?

If you look at the latest addition that is what you need to know... It's a simple file drop in:

https://github.com/opnsense/plugins/commit/978e4a982d8

You can find all the currently implemented providers in the contaning directory:

https://github.com/opnsense/plugins/tree/master/dns/ddclient/src/opnsense/scripts/ddclient/lib/account


Cheers,
Franco

Perfect, thank you!

I'm pretty much done with my implementation but I've coded my solution without testing or debugging it. Are there any simple strategies I can use for some rudiment manual testing?

Throw it in the mentioned directory on an OPNsense install and see if it works? :)


Cheers,
Franco

Thanks! that worked well enough. However I hit a bump.

As it turns out, dynadot has a DDNS mode which you can optionally enable for your domain. It will generate a DDNS client key, separate from the API key generated for full API access. .

However, in DDNS mode your domain DNS record cannot hold MX, TXT or other values than A and AAAA, and as such, this will not work well for people who are perhaps hosting their email elsewhere.

In order to make this implementation user friendly, I would have to either


  • make two plugins, one for Dynadot API mode, and one for Dynadot DDNS mode.
or
  • make a plugin with custom configuration options in the opnsense UI

Any recommendations here?

The main focus of DynDNS is A/AAAA. If providers support more types that's up to them, but for the users that's the only two that count, because DynDNS is mostly a home feature and most home users don't need anything other than A/AAAA.


Cheers,
Franco

Quote from: franco on August 08, 2024, 08:39:55 AM
The main focus of DynDNS is A/AAAA. If providers support more types that's up to them, but for the users that's the only two that count, because DynDNS is mostly a home feature and most home users don't need anything other than A/AAAA.
And at least MX records point to FQDNs and not to IP addresses so I cannot think of a situation when you would want to change them dynamically. Likewise for SPF and all other mail related friends.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: franco on August 08, 2024, 08:39:55 AM
The main focus of DynDNS is A/AAAA.

I agree, but I should point out and highlight that in DDNS mode, the dynadot DNS record cannot HOLD anything but A and AAAA entries.

For reasons mentioned by @Patrick M. Hausen one wouldn't want to update anything but A and AAAA using dyndns, but that is besides the point.

I might not exactly fit the homeuser profile, but my own intended use case is to update A and AAAA records for the same domain for which I use a third party email-hosting provider. So I will need to maintain a DNS record with A, AAAA, MX and TXT values.

Although only the A and AAAA records would be modified by opnsense.

For now I've pushed on by using the username field to toggle between DDNS and API mode, since that field was unused anyways, but it's definitely too obscure of a solution for my taste  :-\