Thanks to soxfan and uxbod I was finally able to get a split dns - to resolve a fake domain - running on my install of Ubuntu 8.04 Server Ed. (mine is 64 bit). There are how-tos and other posts on this but they did not contain all the info I needed to get this running.
Be sure to do this BEFORE you install Zimbra. My machine name is mailserv and the sub-domain mailserv.mydomain.com does not actually exist. Local IP address is 192.168.7.101.
1.Install Ubuntu Server Ed. (no GUI, no extras/add-ons). Basically, you can take all the defaults (just make sure your networking is setup correctly).
2.Install openssh-server - optional but allows remote admin - and bind9 (using apt-get).
3.Setup /etc/hosts file as follows (where mailserv is the name of the machine and 192.168.7.101 is the local/internal IP address of the machine):
Code:
127.0.0.1 localhost.localdomain localhost
192.168.7.101 mailserv.mydomain.com mailserv
4.Setup /etc/resolv.conf as follows (w/ local IP address):
Code:
search mydomain.com
nameserver 192.168.7.101
5.Setup /etc/bind/named.conf.options:
Code:
options {
auth-nxdomain no; # conform to RFC1035
query-source address * port 53;
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
forwarders { 24.226.1.93; 24.226.10.193; };
};
include "/etc/bind/rndc.key";
zone "mydomain.com" {
type master;
file "/var/named/db.mydomain.com";
}; Note. You will probably have to add the /var/named and /var/named/data directories. Also, the forwarders are the IPs of your actual DNS servers, usually assigned by your ISP
6.Setup a new file /var/named/db.mydomain.com:
Code:
;
; BIND data file for mydomain.com
;
$TTL 604800
@ IN SOA mydomain.com. admin.mydomain.com. (
070728 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS 192.168.7.101
IN A 192.168.7.101
IN MX 10 mailserv
mailserv IN A 192.168.7.101 Note: You MUST update/increment the serial number in this file each time you change it. Otherwise the changes will not take. Also, on the IN SOA line, the second entry is your domain's administrator email address, but using a '.' in place of the '@' symbol.
7.Fix apparmor (there is a bug) by changing the following line in /etc/apparmor.d/usr.bin/named:
Code:
/proc/net/if_inet6 r,
to:
Code:
/proc/**/net/if_inet6 r,
8.Also set apparmor to only complain about bind:
Code:
sudo aa-complain /usr/sbin/named
9.Reboot. Check that all is working by issuing the command nslookup on your “domain” and you should get a response somewhat similar to:
Code:
user@mailserv:~$ nslookup mailserv.mydomain.com
Server: 192.168.7.101
Address: 192.168.7.101#53
Name: mailserv.mydomain.com
Address: 192.168.7.101