Open marioja opened 1 year ago
Ok, so in your case you already manually added a DNS record for one or more of the hosts that have been given a dynamic address by DHCP? This script does not consider that case. Like you said, this script just adds an A record for each dymanic address it finds. Should this script do something different? How would it know which existing names in DNS should not be added?
Ok, so in your case you already manually added a DNS record for one or more of the hosts that have been given a dynamic address by DHCP? This script does not consider that case. Like you said, this script just adds an A record for each dymanic address it finds. Should this script do something different? How would it know which existing names in DNS should not be added?
Hi. I believe I have the same issue. After a reboot all my customized static DHCP configuration has been lost. I had to recreate it manually. In the meantime, the newly random IP attributed by DHCP have been imported in the A records. Now, i have some duplicated A records in the DNS A records (several times the same IP adresses). I would like to have it cleaned up. Is it something doable? Thanks you.
So if you use this script, there will basically 2 types of A records.
When this script runs again, it will check the dhcp changes and update DNS, but only for the records of type 2. The script tries to not change anything for records of type 1. If your DNS was "misconfigured" to start with, i.e. you had some entries of type 1 that you created to reflect a dynamic address before using this script, it might be possible that things get confused.
The best practice is to start with a DNS that does not have any type 1 records that map to a dynamic address assigned by DHCP - let this script handle that part.
So if you use this script, there will basically 2 types of A records.
- records created manually in the GUI
- records created automatically by this script.
When this script runs again, it will check the dhcp changes and update DNS, but only for the records of type 2. The script tries to not change anything for records of type 1. If your DNS was "misconfigured" to start with, i.e. you had some entries of type 1 that you created to reflect a dynamic address before using this script, it might be possible that things get confused.
The best practice is to start with a DNS that does not have any type 1 records that map to a dynamic address assigned by DHCP - let this script handle that part.
On my side, I am pretty sure I didn't create any record manually but yet I have some duplicates. How can I clean it up?
what version of DSM are you running?
what version of DSM are you running?
DSM 7.2.1 update 1
ok. I haven't tried this script with DSM 7 and I have no ability to test it either. Maybe someone else that is running DSM 7 can help?
If you have existing A records in DNS then the diskstation_dns_modify.sh script when run for the first time will create duplicate A records in DNS. The problem is that those records cannot be deleted using the GUI. I had to do surgery to correct this.