mhofer117 / ispconfig-ddns-module

ISPConfig module to support Dynamic DNS updates for users
MIT License
30 stars 5 forks source link

ddns updates are pushed to DNS servers via ddns table #11

Closed AlphaDE closed 1 year ago

AlphaDE commented 1 year ago

After having found and installed this great enhancement, I noticed that updates to existing records are not only pushed using the standard DNS update process but also by pushing the ddns_token table updates to all configured DNS servers

As ISPConfig itself handles the whole processing, this is not necessary and the ddns_token tables do not need to exist on the DNS servers.

The missing ddns_token table results in error reports and the push is not necessary.

mhofer117 commented 1 year ago

So I was finally able to spin up a test cluster to verify this.

Just to be clear, this is not related to individual dns record updates (ddns updates). Only for updates on the tokens?

For the tokens I found that because the ddns_token table is missing a server_id, ISPConfig automatically assumes this has to be pushed to all servers, similar to clients.

The solution would be to either

  1. disable datalog entries by setting $form['db_history'] = 'no'; in form/ddns_token.tform.php, but this would no longer write any audit logs under Monitor -> Data Log History
  2. add server_id to ddns_token table and set it to the current server (or let the user choose). This will limit the token to that server. In addition, the datalog updates will be displayed in the UI and it appears there is no way to add translations there with a module (only in core ispconfig files).

For now, I will prepare an update with a basic implementation of the second solution.

mhofer117 commented 1 year ago

Version 1.4.0 was just published which should fix this. A DB migration is required, see relase notes.

Note that existing tokens will have a server_id of 0, which would still cause them to be pushed to other servers during delete. For new tokens or as soon as you modify a token, the server_id is correctly set.