Changing primary DNS server

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
patrickwilson82
Advanced member
Advanced member
Posts: 78
Joined: Tue Mar 13, 2018 5:37 pm

Changing primary DNS server

Postby patrickwilson82 » Fri Jun 01, 2018 1:50 pm

Hopefully someone can help with this. I hope it's quite simple, but I haven't been able to find any information elsewhere. I'm changing to a new internal primary DNS server, and I'm not sure where to go in Zimbra to point it to the new server. When I do an nslookup on my Zimbra server it gives me:

Server: 127.0.0.1
Address: 127.0.0.1#53

.53 is the address of my current primary DNS so I'm assuming that's what the #53 means. Does anyone know how I change this to my new primary DNS server?


patrickwilson82
Advanced member
Advanced member
Posts: 78
Joined: Tue Mar 13, 2018 5:37 pm

Re: Changing primary DNS server

Postby patrickwilson82 » Fri Jun 01, 2018 2:45 pm

Looks like I found what I needed. I will need to edit /etc/network/interfaces.
phoenix
Ambassador
Ambassador
Posts: 26449
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Changing primary DNS server

Postby phoenix » Fri Jun 01, 2018 2:51 pm

Unless you have the Zimbra dns caching nameserver installed then the correct place would be your /etc/resolv.conf file or the network interface entry and that gets it updated when the network is started.
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
patrickwilson82
Advanced member
Advanced member
Posts: 78
Joined: Tue Mar 13, 2018 5:37 pm

Re: Changing primary DNS server

Postby patrickwilson82 » Tue Jun 05, 2018 9:09 pm

phoenix wrote:Unless you have the Zimbra dns caching nameserver installed then the correct place would be your /etc/resolv.conf file or the network interface entry and that gets it updated when the network is started.

What do I need to put in resolv.conf? It currently has:

nameserver 127.0.0.1
search my.domain

I edited /etc/network/interfaces with my two new DNS server addresses. When I turn off DNS on the old primary DNS server outgoing messages are not delivered, even though this should be pointing towards the new DNS server.

# The primary network interface
auto ens160
iface ens160 inet static
address 10.10.10.168
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
gateway 10.10.10.57
dns-nameservers 10.10.10.163 10.10.10.169
dns-domain my.domain
dns-search my.domain
patrickwilson82
Advanced member
Advanced member
Posts: 78
Joined: Tue Mar 13, 2018 5:37 pm

Re: Changing primary DNS server

Postby patrickwilson82 » Tue Jun 05, 2018 9:16 pm

Everything else on my network is working fine with DNS with the new servers except for Zimbra. The issue appears to just be with outgoing messages. It seems like Zimbra is caching the old DNS server somewhere.
phoenix
Ambassador
Ambassador
Posts: 26449
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Changing primary DNS server

Postby phoenix » Wed Jun 06, 2018 5:48 am

Have you actually installed a caching nameserver on your ZCS server? Do you have (or have you ever had) the Zimbra dnscache service installed/enabled on your ZCS server? Your hosts file indicates that you have a name server of some sort on the ZCS server itself, you can check that with a "zmcontrol status", does dnscache show in that list? What is the IP address of the DNS server on your LAN?
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168
patrickwilson82
Advanced member
Advanced member
Posts: 78
Joined: Tue Mar 13, 2018 5:37 pm

Re: Changing primary DNS server

Postby patrickwilson82 » Wed Jun 06, 2018 12:38 pm

phoenix wrote:Have you actually installed a caching nameserver on your ZCS server? Do you have (or have you ever had) the Zimbra dnscache service installed/enabled on your ZCS server? Your hosts file indicates that you have a name server of some sort on the ZCS server itself, you can check that with a "zmcontrol status", does dnscache show in that list? What is the IP address of the DNS server on your LAN?


DNScache is running. When I run the command zimbra@ZM01:~$ zmprov getServer `zm01' | grep DNSMasterIP to find what DNS server is being cached, this is all I get.

zimbra@ZM01:~$ zmprov getServer `zm01' | grep DNSMasterIP
>
patrickwilson82
Advanced member
Advanced member
Posts: 78
Joined: Tue Mar 13, 2018 5:37 pm

Re: Changing primary DNS server

Postby patrickwilson82 » Wed Jun 06, 2018 1:32 pm

Even though I couldn't get it to display what addresses it was caching, I was able to update the cached addresses by using zmprov ms `zmhostname` +zimbraDNSMasterIP 8.8.8.8 and zmprov ms `zmhostname` -zimbraDNSMasterIP 8.8.8.8. Thanks for the help!
phoenix
Ambassador
Ambassador
Posts: 26449
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Changing primary DNS server

Postby phoenix » Wed Jun 06, 2018 1:35 pm

It's hardly surprising that it's not working, you have the dnscache service running, no master DNSmasterIP set and your hosts file points to the ZCS server. My suggestion would be to stop and disable the dnscache service on your ZCS server then change the resolv.conf to point to the LAN IP of your real caching server and (possibly) restart the networking service to make sure the resolve file is set correctly. That's basically the configuration I use for my ZCS server and it works fine.
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 6 guests