Bind 9 & Virtual Hosting

Adrian Brooks azrealshelper at yahoo.com
Thu Nov 3 11:37:22 UTC 2005


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?
 
Thanks for any help you can offer.
 
~Adrian

		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  



More information about the bind-users mailing list