The following steps I've compiled from these sources:
Ubuntu 8.04 LTS Server (Hardy Heron) Install Guide - Zimbra :: Wiki [SOLVED] DNS in a nutshell Split DNS - Zimbra :: Wiki The Perfect Server - Ubuntu Hardy Heron (Ubuntu 8.04 LTS Server) | HowtoForge - Linux Howtos and Tutorials http://help.ubuntu.com/community/BIND9ServerHowto
During the Ubuntu Server installation I interrupted the DHCP network configuration and chose to do a manual network config. with the following settings:
Code:
IP: 10.0.1.100
Netmask: 255.255.255.0
Gateway: 10.0.1.1
Nameserver: 10.0.1.100
Hostname: mail
Domain: mydomain.se
At "Partition Disks" I selected "Guided - use entire disk" and accepted the default partition scheme.
Q7: This question is linked to Q6 about the virtual disk setup. Should I modify the partitioning scheme and if so what would be suitable for my mail server?
Finally, at the "Software Selection" screen I selected:
Code:
DNS server
OpenSSH server
Once the installation completed I updated the apt package database and installed any updates:
Code:
sudo apt-get update
sudo apt-get upgrade --show-upgraded
Now I installed "ntpd" for timekeeping against a network time server:
Code:
sudo apt-get install ntp
Note: The following two links are useful for configuring the ntpd service and making sure you follow best practices for virtual machine time management.
https://help.ubuntu.com/8.04/serverguide/C/NTP.html http://kb.vmware.com/selfservice/mic...rnalId=1006427
Installing VMware Tools is also recommended and I did using an Operating System Specific Package (OSP). See this link for information:
http://www.vmware.com/pdf/osp_install_guide.pdf.
At this point I tackled Split-DNS. I can't say that I have fully grasped everything that follows, but since Zimbra will be behind a firewall this is essential.
I started by verifying the hosts file and modifying the first line, so that the file looks like this:
/etc/hosts
Code:
127.0.0.1 localhost.localdomain localhost
10.0.1.100 mail.mydomain.se mail
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Next I verified resolv.conf:
/etc/resolv.conf
Code:
search mydomain.se
nameserver 10.0.1.100
The next file to modify is named.conf.options. I've seen different variations of this file, but this is what mine looks like. The only thing I've changed is to uncomment "forwarders" and add my ISP's DNS servers.
/etc/bind/named.conf.options
Code:
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.
// query-source address * port 53;
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
195.67.199.39;
195.67.199.40;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
}; Q8: Should the forwarders be the ISP's DNS servers or the DNS servers that mydomain.se points to?
Add a DNS zone by editing named.conf.local. All I did was add the part in bold.
/etc/bind/named.conf.local
Code:
//
// Do any local configuration here
//
zone "mydomain.se" {
type master;
file "/etc/bind/db.mydomain.se";
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918"; Next I used an existing zone file as a template (I saw this here
https://help.ubuntu.com/community/BIND9ServerHowto): Code:
sudo cp /etc/bind/db.local /etc/bind/db.mydomain.se
After making a copy I made a number of changes (shown in bold). Again I've seen many variations of this file.:
/etc/bind/db.mydomain.se
Code:
;
; BIND data file for mydomain.se
;
$TTL 604800
@ IN SOA mail.mydomain.se. admin.mydomain.se. (
20100603 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS mail
IN MX 10 mail
IN A 10.0.1.100
mail IN A 10.0.1.100 Q9: There are two things that I'd like help with in the above file.
a) Should I change the different time durations from the default?
b) If my understanding of Split-DNS is correct then the four last lines should be the same as the two that I setup in Q2 above, but with the LAN IP. Well they are not as I followed the Ubuntu 8.04 LTS Server (Hardy Heron) Install Guide - Zimbra :: Wiki. Perhaps someone can please clarify this for me. Q10: I read something about chrooting BIND. According to the information in Ubuntu's BIND9ServerHowto this is recommended if AppArmor is not installed. Well I have not made any changes to AppArmor and frankly not sure about all of this. What is the recommended approach?
Finally, I finish off this long section (thank you for reading) by restarting bind:
Code:
sudo /etc/bind/init.d/bind9 restart
Then running the following diagnostics, which hopefully means more to you than me
dig mydomain.se mx
Code:
; <<>> DiG 9.4.2-P2.1 <<>> mydomain.se mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24887
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;mydomain.se. IN MX
;; ANSWER SECTION:
mydomain.se. 604800 IN MX 10 mail.mydomain.se.
;; AUTHORITY SECTION:
mydomain.se. 604800 IN NS mail.mydomain.se.
;; ADDITIONAL SECTION:
mail.mydomain.se. 604800 IN A 10.0.1.100
;; Query time: 2 msec
;; SERVER: 10.0.1.100#53(10.0.1.100)
;; WHEN: Tue Jun 8 19:56:37 2010
;; MSG SIZE rcvd: 85
dig mydomain.se any
Code:
; <<>> DiG 9.4.2-P2.1 <<>> mydomain.se any
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53740
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:
;mydomain.se. IN ANY
;; ANSWER SECTION:
mydomain.se. 604800 IN SOA mail.mydomain.se. admin.mydomain.se. 20100603 604800 86400 2419200 604800
mydomain.se. 604800 IN NS mail.mydomain.se.
mydomain.se. 604800 IN MX 10 mail.mydomain.se.
mydomain.se. 604800 IN A 10.0.1.100
;; ADDITIONAL SECTION:
mail.mydomain.se. 604800 IN A 10.0.1.100
;; Query time: 1 msec
;; SERVER: 10.0.1.100#53(10.0.1.100)
;; WHEN: Tue Jun 8 19:57:21 2010
;; MSG SIZE rcvd: 143
host `hostname`
Code:
mail.mydomain.se has address 10.0.1.100