Any progress with this? I’d really rather not have 3 machines pretend to be 2 dns servers if I can help it
Just as an update. I emailed IWorx support yesterday and they’ve fixed the bug in the synchronisation module and patched my servers with it. I now have my two iworx CP servers synchronising dns data between themselves happily.
Soon I will be testing synchro between 3 servers
I’m going to come full-circle with this post and harken back to (what I believe to be) GetHosted’s original thought - which was to sync external DNS servers to an (or multiple) IWorx boxes - which for some of us, there is still great benefit.
Preface: to replicate the DNS from one IWorx box to another, you should use the new DNS syncing tool provided from within IWorx. It works fabulously (as expected). Don’t bother with anything else in this post.
If however, you’re still interested in being able to export the DNS from one (or multiple) IWorx boxes to a standalone (non-IWorx) DNS server, but can’t seem to find GetHosted’s aforementioned script, or can’t make it work, then this should help.
Firstly, I hope I’m not over-stepping my boundries here, but I’ve attached GetHosted’s original (unaltered) dns_sync script. The following are the changes I made to get it functional.
- I changed the DJBDNS install to match mine (which is Bernstein’s default).
$TINYDNS_DIR='/etc/tinydns'; // note lack of trailing slash
- N.B. If you’re going to only sync with one external IWorx server (either for testing or intended), make sure you only have one entry in the array (and no matter how many you use, they must be referenced by DNS name, not IP). Multiple servers = multiple DNS names … array(‘fooblah1.com’,‘fooblah2.com’);
$IWORX_SERVERS = array('fooblah.com'); // to add additional servers
- The real fix was adding the missing SOA record. Without this, the sync happens but I could never get any of the DNS records to actually query.
case "SOA":
$this_server_data.= "Z".$record['domain'].":".$record['nameserver'].":".$record['contact'].":".$record['serial'].":".$record['refresh'].":".$record['retry'].":".$record['expire'].":".$record['minimum']."
";
break;
- For completeness I added the PTR record (which a bit pointless for me, but since it’s available in IWorx I put it in) and the TXT record (which is nice for the SPF entries):
case "TXT":
$this_server_data.= "'".$record['domain'].":".$record['target'].":".$record['ttl']."
";
break;
case "PTR":
$this_server_data.= "^".$record['target'].":".$record['host'].":".$record['ttl']."
";
break;
And, voila, they sync.
Regards,
JB
dns_sync.php (11.9 KB)
I’m sharing this, just in case somebody got the same problem as me:
The “Z” shoud be a “D” in this piece of code:
case "SOA":
$this_server_data.= "Z".$record['domain'].":".$record['nameserver'].":".$record['contact'].":".$record['serial'].":".$record['refresh'].":".$record['retry'].":".$record['expire'].":".$record['minimum']."
";
break;
If you keep it like this, your SOA admin contact would be admin@domain@com
If you change it in this:
case "SOA":
$this_server_data.= "D".$record['domain'].":".$record['nameserver'].":".$record['contact'].":".$record['serial'].":".$record['refresh'].":".$record['retry'].":".$record['expire'].":".$record['minimum']."
";
break;
When you have it like this, your SOA admin contact would be admin@domain.com
Well, it’s important for .de and .nl TLDs, otherwise you can’t register domains with your nameservers.
EDIT: That worked only for a few seconds…
I added the second line to the code to fix this issue:
case "SOA":
$record['contact'] = strtr($record['contact'], "@", ".");
$this_server_data.= "Z".$record['domain'].":".$record['nameserver'].":".$record['contact'].":".$record['serial'].":".$record['refresh'].":".$record['retry'].":".$record['expire'].":".$record['minimum']."
";
break;
Ok I have server A where I have my own dns servers.
I Want server B send updates DNS to server A
So on server B I did :
- In the overview DNS I have enter the 2 servers ns1.x.net and ns2.x.net that is set on the overview dns of server A (same name = same ip)
- I have setup the dns-sync tool to add as listener server A
If I understand well, all dns changes on servers B will be replicate on server A
so all my customers may use the same dns servers adersses
Is it right ?
Pascal
Hey guys,
My interworx server has crashed today. And the DNS_sync tool is working on an other server. But I think the sync tool isn’t functioning the way it should when something like this happens.
It just empties the DNS list, because it can’t connect with the original server. So it can’t resolve any domains where it was ment for.
Can somebody help me to fix the problem so when the server blacksout it is still possible to resolve the domains.
Yours sincerely,
John
You can create a dedicated secondary DNS server and update this DNS server with steps 7 and 8 of this howto:
http://www.interworx.com/forums/showthread.php?t=1540&highlight=DNS
When one server crashes, then the records are still there on the secondary DNS server.
@ Chris –
Do you know if it’s possible to alter the remote-access.ini file, and have the changes not get overwritten for IWorx boxes located at certain Data Centers?
I ask because it seems that certain DCs overwrite this file when they sense it’s been altered (may be a function of Noxworx?). If it gets overwritten, it’s impossible to do any manual syncing at all, since one can’t place “trusted” IPs in the remote-access.ini.
Is this true?
JB
erm … hello?
OK – @ anyone IWorx?
JB
Buehler … Buehler …
Hi Jaybean,
Sorry for the delay on this. This is a bug on our part in the dns-export.php code. You are correct, it doesn’t affect everybody, so if you are finding your remote-access.ini being rewritten, open a ticket and we’ll get your box patched up.
Socheat
Excellent.
2 Tickets submitted (2 servers of 3 effected).
JB
Worked like a charm.
Thanks again.
JB
Whats the word on DNS sync now?
Hello guys/gals
Whats the word on this dns syncronization now? Interworx appears to have this built in.
I currently purchased 2 VPS with different ip blocks for primary and secondary DNS and was planning to sync all interworx servers. But after reading through this thread I’ve this feeling this information is a bit outdated.
If anyone has information to share on this subject I would greatly be indebted to them!
From what I can gather from the documentation and this old thread.
[LIST=1]
Seems I can only have one master, so what do I do about NS2 the primary NS?
I currently using NS1-12 as all servers are hosting their own DNS. Know how hard it is to get some people to update their NS. Can I continue to utilize all those NS from Master and then just provide new customers with NS1 and NS2?
Thank you so much in advance!
You say “planning to sync all interworx servers”
does this mean that vps1 & vps2 are running Interworx?
does this mean that vps1 & vps2 are running Interworx?
Not yet. I am trying to find out what I need to do first. I already jumped the gun here and am trying to see what the new process is before proceeding any further. I am not even sure I need 2 vps as it appears I can only utilize 1 master. My guess would be that theres 1 master and each server plays its own secondary.
No response for this thread. Does interworx dns sync even work?
Is interworx coming to an end? I used to get faster responses from this forum.
We use DNS Syncing across an bunch of interworx servers, and it works great.
we ahd got it setup before it was officially released, and an update (v3.0.0 I think) caused an API key issue, which was resolved easily/quickly and they sync every X minutes and it works flawlessly.
Thanks!
So heres my question - would this be feasible setup?
few interworx servers. ns2-14 pushes dns to vms
1 vms with interworx. vms uses ns1 (this vms does nothing but serve dns)
Each domain use ns1 and whatever number for their server as secondary?
Thats my confusion with this syncing. I’ve worked with large companies that set up bind primary and secondary and sometime a third and forth and non of the other servers handle any DNS records as they are handled by the primary and secondary servers.
I cannot find much docs on interworx dns sync system to fully understand this enough to move forward. So if someone can shed some light i would very much appreciate it.
Thank you!!
Sure, that would be one way to set it up. Or, you could specify one of the other servers (say, ns2) to also sync with the other servers like ns1 does, and then everyone could use ns1 and ns2, which might keep things simpler.
Paul