Welcome to WebmasterWorld Guest from 54.81.220.239

Forum Moderators: bakedjake

Message Too Old, No Replies

Help with BIND DNS on Debian

BIND DNS on Debian.

     
12:37 am on Jul 3, 2005 (gmt 0)

New User

10+ Year Member

joined:July 3, 2005
posts:27
votes: 0


A couple days ago I got my first unmanaged debian server. Apache was installed along with MySQL, and PHP. While on the other hand BIND was not. Since then I have installed bind with apt-get install bind9.

I called up my domain register and they asked for one of the IPs to the host so I gave them the IP to ns1 one and the dns information. They have set the IP information but Im still waiting on the name servers to be updated.

While I'm waiting I added cellphonestock.com.hosts to my server /etc/bind/ directory and put the following in it:

$ttl 38400
cellphonestock.com. IN SOA ns1.cellphonestock.com. admin.myemailaddress.com. (
1120334305
10800
3600
604800
38400 )
cellphonestock.com. IN A 69.61.54.66
mysql.cellphonestock.com. IN A 69.61.54.66
www.cellphonestock.com. IN CNAME cellphonestock.com.
ns1.cellphonestock.com. IN A 69.61.54.66
ns2.cellphonestock.com. IN A 69.61.54.70
cellphonestock.com. IN NS ns1.cellphonestock.com.
cellphonestock.com. IN NS ns2.cellphonestock.com.
mail.cellphonestock.com. IN MX 1 cellphonestock.com.

I typed in my domain cellphonestock.com into my browser and it takes me to my unmanaged server but to the apache2 default directory (You can try it to see what I知 talking about).

I did not setup and virtual servers as it had one setup for local and someone had told me I only need them if I知 going to setup user accounts, which I知 no.

I have looked around the web for answers on this but I知 missing something and I知 hoping someone can help me get it sorted as the domain is not going to the right directory. I知 thinking that it could be because ns1 and ns2 have not been updated on the domain, but from what I see the domain is registry is getting the domain directed in the right direction to my server.

Any help or quality links to getting this setup would really help!

3:25 pm on July 3, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 31, 2003
posts:1316
votes: 0


If you're getting to the right machine, but the wrong web page, then it's the apache config. If that's going to be the only site on the server, you can set the DocumentRoot in httpd.conf. If you'll have more than one site, you'll need to set up name virtual hosting (then each site will be a different user).
5:29 am on July 7, 2005 (gmt 0)

New User

10+ Year Member

joined:Oct 17, 2003
posts:17
votes: 0


mcavic has it nailed down.

you can test your DNS configuration by running queries against it;

dig foobar.com @123.123.123.123

replace foobar.com with your domain and 123.123.123.123 with the IP of your DNS server.

6:20 am on July 7, 2005 (gmt 0)

New User

10+ Year Member

joined:July 3, 2005
posts:27
votes: 0


After 3 days I found that the server had some problems and the host fixed it. As of the other day I got my first DNS setup and Im ready to roll.

Thanks for the help, sorry I did not reply sooner, but WebmasterWorld did not send me a email till today!

8:25 am on July 7, 2005 (gmt 0)

New User

10+ Year Member

joined:July 3, 2005
posts:27
votes: 0


The rolling good was short lived. LOL

I have given up on the host to be able to install a working version on webmin so Im down in the shell now. At this point I have gotten one site to work and to act as my dns(all good their). When I went to add a 2nd domain it did not go as well. I gave dig a try and only got back ;; global options: printcmd
;; connection timed out; no servers could be reached. I could use some help on this one, what am I doing wrong?

in httpd.conf:

<VirtualHost *:80>
DocumentRoot /var/www/mydnsserver.com
ServerName www.mydnsserver.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /var/www/thenewsite.com
ServerName www.thenewsite.com
</VirtualHost>

In mydnsserver.com.hosts
$ttl 38400
mydnsserver.com. IN SOA localhost.localdomain. admin.myaddy.com. (
1120591774
10800
3600
604800
38400 )
mydnsserver.com. IN NS localhost.localdomain.
mydnsserver.com. IN A 11.22.44.55
www.mydnsserver.com. IN CNAME mydnsserver.com.
ns1.mydnsserver.com. IN A 11.22.44.55
ns2.mydnsserverr.com. IN A 11.22.44.55

In thenewsite.com.hosts
$ttl 38400
thenewsite.com. IN SOA localhost.localdomain. admin.myaddy.com. (
1120591774
10800
3600
604800
38400 )
thenewsite.com. IN A 11.22.44.55
www.thenewsite.com. IN CNAME thenewsite.com.
ns1.mydnsserver.com. IN A 11.22.44.55
ns2.mydnsserver.com. IN A 11.22.44.55

Once more thanks!

3:00 pm on July 12, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 16, 2000
posts:122
votes: 0


In mydnsserver.com.hosts
$ttl 38400
mydnsserver.com. IN SOA localhost.localdomain. admin.myaddy.com. (
1120591774
10800
3600
604800
38400 )
mydnsserver.com. IN NS localhost.localdomain.
mydnsserver.com. IN A 11.22.44.55
www.mydnsserver.com. IN CNAME mydnsserver.com.
ns1.mydnsserver.com. IN A 11.22.44.55
ns2.mydnsserverr.com. IN A 11.22.44.55

The bold items quoted above are problems, especially for the SOA record. It should be your primary authoritave nameserver, ns1.mydnsserver.com.
not localhost.localdomain

Also 1120591774 should be the actual date you created or changed the zone file in format yyyymmddxx. eg 2005071201.

The zone file below is an example of the set up I use for nameservers.

$TTL 172800 
@ IN SOA ns1.mydnsserver.com. admin.myaddy.com. (
2004032203
3600
7200
604800
14400 )
mydnsserver.com. IN NS ns1.mydnsserver.com.
mydnsserver.com. IN NS ns2.mydnsserver.com.
mydnsserver.com. IN MX 0 mail.mydnsserver.com.
mydnsserver.com. IN A 10.20.30.40
mail IN A 10.20.30.40
www IN A 10.20.30.40
ns1 IN A 10.20.30.40
ns2 IN A 10.22.33.44

For additional domains I would normally use the following

$TTL 172800 
@ IN SOA ns1.mydnsserver.com. admin.myaddy.com. (
2005071201
3600
7200
604800
14400 )
thenewsite.com. IN NS ns1.mydnsserver.com.
thenewsite.com. IN NS ns2.mydnsserver.com.
thenewsite.com. IN MX 0 mail.thenewsite.com.
thenewsite.com. IN A 10.20.30.40
www IN A 10.20.30.40
mail IN A 10.20.30.40