View Single Post
  #2 (permalink)  
Old 11-02-2005, 10:32 AM
andreychek andreychek is offline
Special Member & Volunteer
 
Posts: 155
Default

Quote:
Originally Posted by codecoward
So as far as I understand it, I need to have the first DNS server in my resolv.conf file point to something that in turn points to the internal ip address first. That way, when postfix asks where "mail.example1.com" or "mail.example2.com" are located, it points them to 192.168.1.3 before it points them to the external ip.

Is that correct, or am I way off base? And if it is correct... (the million dollar question) how do I get it to work?
Hmm. I haven't run into that problem... but, I'm going to move ahead making the assumption that this here is correct. That's what I gathered from the messages the Zimbra folks left. So, maybe we can fix it --

Quote:
Originally Posted by codecoward
Fedora Core 4 has BIND installed by default, so I would imagine that I use that. However, the documentation/forums and information about DNS and Bind is pretty archaic, and I have been unable to find anyone that just needs to use a small DNS footprint that ONLY translates a host to an internal ip address.
BIND offers a lot of functionality for what you need, it may be overkill. At the same time, it comes with Fedora, is well supported, and there are lots of examples of how to make it work. And, more to the point, I can tell you how to do what you need to in order for it to work, something I can't say for the others :-)

I only have a copy of CentOS/RedHat Enterprise in front of me. I'm assuming that their setup for BIND is the same as Fedora. What you'll need to do is this:

(assuming that you're running BIND on the same machine as Zimbra, and that you'll change "mydomain.com" to whatever your domain is, and "hostname" to whatever your hostname is)

* Edit /etc/named.conf, and add your domain like so to the end of the file:

Code:
zone "mydomain.com" {
	type master;
	file "/var/named/mydomain.com.hosts";
};
* Create a file /var/named/mydomain.com.hosts, and add this to it:

Code:
$ttl 38400
@	IN	SOA	hostname.mydomain.com. root.hostname.mydomain.com. (
			2005110200
			10800
			3600
			604800
			38400 )
@	      IN	NS	hostname.mydomain.com.
@             IN        MX     10 hostname.mydomain.com.
@	      IN	A	192.168.1.3
hostname IN        A       192.168.1.3
mail1       IN	      CNAME	hostname
mail2       IN        CNAME     hostname
* Edit /etc/resolv.conf, comment out the "nameserver" line(s), add make it read:

Code:
nameserver 127.0.0.1
Now restart bind:

service named restart

After all that, if you run the command:

dig a mydomain.com

You should get a few lines of output, that includes something like:

Code:
;; ANSWER SECTION:
mydomain.com.	2400	IN	A	192.168.1.3
I haven't tried the above. While I pieced it together from other settings I do have working, I'm not 100% certain there are no syntax errors and that sort of thing in this. You'll want to do a sanity check on anything you are typing in :-)

There are a lot of examples of how to setup BIND for handling DNS. One good place to start is the BIND HOWTO:

http://langfeldt.net/DNS-HOWTO/BIND-9/

Have a good one,
-Eric

Last edited by andreychek; 11-16-2005 at 06:47 AM.. Reason: Oops, forgot MX Priority
Reply With Quote