Difference between revisions of "Split DNS"

m (Configuring Bind on the Zimbra Server (Red Hat Enterprise Linux))
Line 18: Line 18:
  include "/etc/rndc.key";
  include "/etc/rndc.key";
  // We are the master server for server.example.com
  // We are the master server for server.example.com
  zone "server.domain.com" {
  zone "server.example.com" {
     type master;
     type master;
     file "db.server.example.com";
     file "db.server.example.com";

Revision as of 19:27, 1 May 2008


Installations of Zimbra behind a firewall often require the creation of some form of split DNS. This is because the Postfix mail system used by Zimbra performs a DNS lookup when attempting to route email to the back-end message store. Frequently, this is the same physical host as Postfix. The DNS server frequently returns the external address of the mail host, not the internal address. Depending on how the firewall and network are configured, the external address may not even be reachable from the mail host, and mail will not be delivered.

A Split DNS avoids this problem by providing an internal DNS server that can be used to resolve the internal address of the server. This guide will detail how to set up a very specific, single-host DNS server that can be installed on the Zimbra host itself so that it can resolve its own address. This should not be used for a multi-node Zimbra installation, and should not be used as the DNS server for any other hosts on your network.

Configuring Bind on the Zimbra Server (Red Hat Enterprise Linux)

1. Use up2date to download bind from Red Hat Network.

# up2date bind

2. Edit the /etc/named.conf file. (Substitute your fully-qualified server name for server.example.com in all cases, and if named runs in a chroot'ed directory /var/named/chroot, named.conf should be placed in /etc/named/chroot/etc/named.conf and you should create a symbolic link to /etc/named.conf.)

// Default named.conf generated by install of bind-9.2.4-2
options {
       directory "/var/named";
       dump-file "/var/named/data/cache_dump.db";
       statistics-file "/var/named/data/named_stats.txt";
forwarders { <address of current DNS server> ; };
include "/etc/rndc.key";
// We are the master server for server.example.com
zone "server.example.com" {
    type master;
    file "db.server.example.com";

Make sure to set the forwarders to match the DNS servers currently in use on your system. The forwarders setting allows the server to query those DNS servers for any addresses for which it is not authoritative.

3. Create a /var/named/db.server.example.com zone file. (If named runs in a chroot'ed directory /var/named/chroot, db.server.example.com should be placed in /etc/named/chroot/var/named/db.server.example.com and you should create a symbolic link to /var/named/db.server.example.com.)

;       Addresses and other host information.
@       IN      SOA     server.example.com. hostmaster.server.example.com. (
                               10118      ; Serial
                               43200      ; Refresh
                               3600       ; Retry
                               3600000    ; Expire
                               2592000 )  ; Minimum
;       Define the nameservers and the mail servers
               IN      NS      <internal address of server>
               IN      A       <internal address of server>
               IN      MX      10 server.example.com.

4. Change /etc/resolv.conf to use the Zimbra server as the primary DNS address. Also remember to change the search path to be the name of the Zimbra server.

5. Start named on the zimbra server

# /etc/init.d/named start

6. Enable autostart of named on boot

# chkconfig named on

You can verify that this is working by typing 'nslookup server.example.com'. It should return the internal address of your server instead of the external address. This should also allow Postfix to deliver mail to your mailboxes.

If you have a number of servers inside the firewall that need to use internal addresses to communicate to each other, you should consider setting up a full internal DNS server that can be authoritative for the whole domain. This example is not suitable for this task.

Additional Information: Zimbra Power Tip: http://www.zimbra.com/blog/archives/2007/06/making_zimbra_bind_work_together_1.html

Verified Against: unknown Date Created: 10/5/2006
Article ID: https://wiki.zimbra.com/index.php?title=Split_DNS Date Modified: 2008-05-01

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search