LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-11-2011, 10:54 AM   #1
Luna-tic
LQ Newbie
 
Registered: Apr 2006
Distribution: Gentoo Linux
Posts: 24

Rep: Reputation: 0
Dedicated server DNS and domain name setup


Hello.

I have a dedicated Centos5 64-bit server. Also, I have a domain name which I want to use to access the server using "server.mydomain.com". Currently, the server has apache running, however it is not reachable using any domain name (only by IP).

I have set up BIND and configured it using the tutorials I found on the net. If I run `host mydomain.com` on the server it returns the correct IP, however if I run it on my local machine it says "Host xxxx not found: 3(NXDOMAIN)". I called the ISP before and they told me that if I have a domain name (the domain names was not bought at the server provider) I have to set up my server's DNS server to that domain and all will work. Could someone explain me how such a thing can be done because I'm lost?

EDIT: If it changes anything, the server has ISPConfig3 running.

Thanks!

my named.conf
Code:
options {
	listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };
        directory	"/var/named/chroot/var/named";
        dump-file	"/var/named/chroot/var/named/data/cache_dump.db";
        statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion yes;
};
logging {
	channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};


zone "." IN {
	type hint;
        file "named.root";
};
zone "mydomain.com" {
       type master;
       file "/var/named/chroot/var/named/mydomain.com.zone";
};

//The next is the reverse DNS entry.
zone "123.123.123.in-addr.arpa" {
        type master;
        file "/var/named/chroot/var/named/123.123.123.db";
};


include "/var/named/chroot/var/named/named.local";
mydomain.com.zone
Code:
$TTL 3h

@	IN	SOA             ns.mydomain.com. root.mydomain.com. (
                2006120702	; counter/ Serial    ; in the format YYYYMMDDCC where CC - counter 1 to 99
                20m             ; refresh
                15m             ; Retry Interval
                1w              ; Expire
                1h )            ; Negative Cache TTL

        IN	NS	ns.mydomain.com.        
        IN	MX	10	mail.mydomain.com.

ns	IN	A	123.123.123.123
mail    IN	A	123.123.123.123
www     IN	A	123.123.123.123
@	IN	A	123.123.123.123
my 123.123.123.db
Code:
@	IN	SOA     mydomain.com. root.mydomain.com. (
                3	; counter/ Serial
                15m     ; refresh
                15m     ; Retry Interval
                1w	; Expire
                1h )    ; Negative Cache TTL

        IN	NS	ns.mydomain.com.

250     IN	PTR     server.mydomain.com.
P.S. The real domain name is changed to mydomain.com and the IP address to 123.123.123.123

Last edited by Luna-tic; 12-11-2011 at 11:00 AM. Reason: ISPConfig3
 
Old 12-11-2011, 01:34 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I called the ISP before and they told me that if I have a domain name (the domain names was not bought at the server provider) I have to set up my server's DNS
server to that domain and all will work. Could someone explain me how such a thing can be done because I'm lost?
You should contact your registrar (the company you used to buy your domain) and change the name server(s) to point to your host(s)
Use this site to see details about your domain

Regards
 
1 members found this post helpful.
Old 12-11-2011, 01:46 PM   #3
Luna-tic
LQ Newbie
 
Registered: Apr 2006
Distribution: Gentoo Linux
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
You should contact your registrar (the company you used to buy your domain) and change the name server(s) to point to your host(s)
Use this site to see details about your domain

Regards
The company that sold the domain gives me a web gui to setup the nameservers for all the domains I have. In the settings, I have to enter domain names of the nameservers for my domain. If I enter IP addresses, it doesn't work. Right now I entered the company that sold me the domain nameserver and my domain's ns.mydomain.com.
 
Old 12-11-2011, 02:02 PM   #4
Luna-tic
LQ Newbie
 
Registered: Apr 2006
Distribution: Gentoo Linux
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
You should contact your registrar (the company you used to buy your domain) and change the name server(s) to point to your host(s)
Use this site to see details about your domain

Regards
IntoDNS tells me this:

Code:
Nameserver records returned by the parent servers are:

ns2.domaincompany.com   ['22.22.22.22']   [TTL=7200]
ns.mydomain.com.   [] (NO GLUE)   [TTL=7200]

e.tld.lt was kind enough to give us that information.
 
Old 12-11-2011, 02:26 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
ns.mydomain.com. [] (NO GLUE) [TTL=7200]
So you miss the glue record. You should contact them in order to register your host as a nameserver. After that, using just the hostname will be enough to use your host as a nameserver for any other domain you own.
Maybe this is already fixed, but you have to wait until your domain data is propagated to the root servers.
Try:
Code:
dig +trace mydomain.com
to see if the root servers down to the parent of your dns are aware of your domain
 
Old 12-11-2011, 02:35 PM   #6
Luna-tic
LQ Newbie
 
Registered: Apr 2006
Distribution: Gentoo Linux
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
So you miss the glue record. You should contact them in order to register your host as a nameserver. After that, using just the hostname will be enough to use your host as a nameserver for any other domain you own.
Maybe this is already fixed, but you have to wait until your domain data is propagated to the root servers.
Try:
Code:
dig +trace mydomain.com
to see if the root servers down to the parent of your dns are aware of your domain
This is what I got.

Code:
; <<>> DiG 9.8.1 <<>> +trace mydomain.com
;; global options: +cmd
.			362475	IN	NS	l.root-servers.net.
.			362475	IN	NS	j.root-servers.net.
.			362475	IN	NS	g.root-servers.net.
.			362475	IN	NS	i.root-servers.net.
.			362475	IN	NS	b.root-servers.net.
.			362475	IN	NS	c.root-servers.net.
.			362475	IN	NS	k.root-servers.net.
.			362475	IN	NS	a.root-servers.net.
.			362475	IN	NS	f.root-servers.net.
.			362475	IN	NS	h.root-servers.net.
.			362475	IN	NS	d.root-servers.net.
.			362475	IN	NS	m.root-servers.net.
.			362475	IN	NS	e.root-servers.net.
;; Received 512 bytes from 222.222.222.222#53(222.222.222.222) in 36 ms

lt.			172800	IN	NS	c.tld.lt.
lt.			172800	IN	NS	b.tld.lt.
lt.			172800	IN	NS	d.tld.lt.
lt.			172800	IN	NS	a.tld.lt.
lt.			172800	IN	NS	e.tld.lt.
;; Received 272 bytes from 192.33.4.12#53(192.33.4.12) in 95 ms

mydomain.com.			7200	IN	NS	ns.mydomain.com.
mydomain.com.			7200	IN	NS	ns2.domaincompany.com.
dig: couldn't get address for 'ns.mydomain.com': not found
222.222.222.222 matches the IP of the nameserver that handled mydomain.com a few weeks ago.

Last edited by Luna-tic; 12-11-2011 at 02:49 PM.
 
Old 12-11-2011, 03:04 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Contact your registrar to see how to register your host as a nameserver (i.e. both the hostname and IP address), so you get the glue record.
Read this to understand why you have to do that.
Or you could use your registrar dns (ns2.domaincompany.com) as a master dns and your host as a secondary for your primary domain (mydomain.com) and then for the rest of the domains you own, you can use ns.mydomain.com as the master dns
 
1 members found this post helpful.
  


Reply

Tags
bind, centos, dns, dnsbind, dnsserver



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Installing A Multiserver Setup With Dedicated Web, Email, DNS And MySQL Database Servers On De LXer Syndicated Linux News 0 08-19-2010 07:30 PM
Domain unable to open when memory hit 40% on dedicated server! modpriest Linux - Newbie 1 02-15-2008 01:03 AM
Secondary DNS server (setup) w/ a windows domain krazyglue Linux - Server 2 12-17-2007 01:02 PM
Dedicated Server with CentOS 4.x and DNS Xoleum Linux - Newbie 3 09-10-2005 02:48 PM
i have taken a domain name. how to set it up on my virtual dedicated server phpsharma Linux - General 4 03-15-2005 07:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration