Bind 9 & Virtual Hosting
Kevin Darcy
kcd at daimlerchrysler.com
Thu Nov 3 18:06:57 UTC 2005
Adrian Brooks wrote:
>I have been looking in so many different places and am starting to find myself more & more frustrated. I hope someone knows how I can properly acheive what it is I need to accomplish, so here's my issue.
>
>I have a FreeBSD 5.4 server, running Apache 2, which is virtual hosting 7 domains total (all on the same IP, obviously) 6 domains and 1 sub. I also am running Qmail, PHP 5 and MySQL 4.x.
>
>The problem I have encountered, only twice so far and intermitently, is that certain emails that are originating from my server are being rejected by their destination host.
>
>Is this happening because I am not currently running a local name server on this system and if so, since I have 7 domains all being hosted out of this box, what does Bind need to properly function in direct relation to these 6 domains and one sub-domain?
>
>I have O'Reilly's DNS and Bind 4th edition, but either it doesn't cover such a configuration or my worst fear is that maybe it's simply not possible to achieve.
>
>I haven't actually fired up the named deamon yet, but have created, (very confusingly), 3 zone files;
>db.mydomain.net (SOA, A records & CNAME records)
>db.127.0.0
>db.192.168.0, and
>db.24.xx.xx (address masked for security reasons)
>
>Two NICs, the internal 192 NIC and the external 24 NIC.
>In order for all my virtual hosts to resolve properly, do I need PTR entries that all point to the same SOA entry in that file? i.e;
>
>---------------------------------------------------------------------------------------------------------
>example contents db.mydomain.net:
>---------------------------------------------------------------------------------------------------------
>$TTL 3h
>mydomain.net. IN SOA mydomain.net. root.mydomain.net (
>... )
>
>mydomain.net. IN NS mydomain.net.
>
>localhost.mydomain.net. IN A 127.0.0.1
>internal.mydomain.net. IN A 192.168.0.1
>www.mydomain.net. IN A 24.xx.xx.xx
>sub1.mydomain.net. IN CNAME internal.mydomain.net.
>
>-----------------------------------------------------------------------------------------------------------
>example contents of db.192.168.0 file
>-----------------------------------------------------------------------------------------------------------
>$TTL 3h
>0.168.192.in-addr.arpa. IN SOA mydomain.net root.mydomain.net (
>.... )
>
>0.168.192.in-addr.arpa. IN PTR mydomain.net.
>
>---------------------------------------------------------------------------------------------------------------
>
>Can someone tell me if I am way off base here, please?
>
>
Email these days does generally require that the address of any given
SMTP client be reverse-resolvable in DNS. This does not *necessarily*
mean that you have to run your own DNS server, and many folks don't and
can SMTP just fine. But it *does* mean that a reverse record exists for
whatever source address your outbound SMTP device uses to connect to
SMTP servers. If your network provider doesn't and can't/won't serve a
reverse record for that IP address, the next best thing would be to have
them delegate to your nameserver and you can serve up the reverse record
yourself. Since you've (grrrrr) obscured all of your address and domain
information, and haven't even identified which of these names/addresses
corresponds to your outbound SMTP box, there's no way to tell whether
you're even close to being able to pull any of this off...
- Kevin
More information about the bind-users
mailing list