LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-14-2013, 12:03 PM   #1
kovlin
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Directing a domain name to a numeric address


I'm pretty much new to linux - actually been using unix/linux for 25 years or so but never done any serious administration.

I've got a web site I operate and have outgrown some of the restrictions placed by my current web host - godaddy. I'm experimenting with a virtual dedicated server. (This is probably overkill now but eventually I want to do some additional work unrelated to just running a web site.)

I've stumbled through the setup mostly successfully. I can get to my site using its numeric address and it operates properly, databases and all. But I can't for the life of me figure out how to set everything so that my domain is directed there.

Here's what I have done:

- set my name servers at godaddy (my registrar) to those specified by my vps host
- created a zone file called named.conf in /etc/bind
- set up a virtual host in apache so my domain is listened for

I'm using debian 6.0 and have webmin.

I think I vaguely know that somehow the nameservers need to be made aware of my domain. But does that happen at boot for my server (since it is defined in the named.conf file on my machine)? I've tried rebooting/applying changes/ and so forth with no luck. I've waited 24 hours or so. Maybe that's not long enough but it could take weeks if I have to wait 3 days for propagation every time I try something.

I know that I can forward my domains on godaddy to the numeric address to make the whole thing basically work. But that's not really the best way to do it.

This should be a very common issue people face. When I look online I find lot's of information about how to set up my own name servers with BIND. That seems straightforward but also seems like overkill. Maybe what I need to do is so simple that most people don't need help.

Maybe I just have a fundamental misunderstanding of what I need to do. I'd appreciate any help!
 
Old 02-14-2013, 11:20 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,667

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
When I look up www.example.com I go the root name servers, who give me the addresses of the nameservers for the com TLD. I ask those nameservers for the address of the nameserver for example.com. Then I ask THAT nameserver for the address of www.example.com. There's no way to start at the bottom. There has to be a chain from the root all the way down. You can't just run an isolated nameserver and expect it to work, because nobody will know how to get to it. Besides, you can't run a server for $9.99 per year.
 
Old 02-15-2013, 08:19 AM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,685
Blog Entries: 10

Rep: Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080
Quote:
I think I vaguely know that somehow the nameservers need to be made aware of my domain.
as long as the IP address (At the Registar!) for each NameServer entry points to a server using the bind9 server|daemon and that server has a zone file for the domain, AND has a A Record, you should be good to go.

and apache serves up the content for the virtualhost entry for that domain.

That is the "flow".
Code:
dig  +short domain.com @IP.address.of.bind.server
should give you the A Record for the domain.

Please let us know...

Last edited by Habitual; 02-15-2013 at 08:20 AM.
 
Old 02-15-2013, 09:36 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Quote:
Originally Posted by smallpond View Post
When I look up www.example.com I go the root name servers, who give me the addresses of the nameservers for the com TLD. I ask those nameservers for the address of the nameserver for example.com. Then I ask THAT nameserver for the address of www.example.com. There's no way to start at the bottom. There has to be a chain from the root all the way down. You can't just run an isolated nameserver and expect it to work, because nobody will know how to get to it. Besides, you can't run a server for $9.99 per year.
No. When you lookup www.example.com you go to your local /etc/resolv.conf file to identify a name server to retrieve what it may know of the name. If it is known (in the local cache) it will return that value immediately.

If it is unknown, then the "www" is stripped off an an attempt to identify the name server responsible for that domain (the example.com).

If that server is unknown, then the "example" is stripped off, and an attempt to identify the server responsible for that domain (the .com). Normally this is cached, so a query to the .com name server is done to find "example.com" (which gets cached).

Then the server for "example.com" is queried for "www.example.com" (and that result is cached). The final answer for "www.example.com" is then returned to the user.

If another query for "www.example.com" appears then the server can return the cached value. If a different host is queried (such as "xyz.example.com") the query is sent to the server for example.com as retrieved from the cache.

This minimizes the amount of network traffic by distributing the information.

To handle the cases where the value assigned to the names change, each value sent out by the responsible name server includes a "expiration" time. This allows the updated values to be propagated to various servers, minimizing traffic (and time).

The usual expiration time is two weeks. There is a case for shorter time - such as those IP numbers assigned by DHCP with limited lifetime leases. If the expiration time is about half the lease lifetime then access will still be available MOST of the time. The failures will be self correcting just by waiting a while. If impatient admins want to, they can flush the local servers cache, which will force queries to rebuild the cache with new data.
 
Old 02-15-2013, 01:58 PM   #5
kovlin
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Please let us know...
Thanks for the help so far

I installed bind9, editted/created the appropriate files, and after a few errors (mostly fat-finger but some conceptual) I think I have it set up correctly. Bind9 restarts with no errors and seems to do what I expect based on the messages in the syslog. I get a couple of "sending notifies" for my domain zone and reverse zone as the last related log entries. I assume these are indications that the nameservers are being sent the information they need. But when I use dig I get nothing - no errors but no A records found for my domain.

I'm actually beginning to think that I do know what I am doing at least partially. I can control whether aliases resolve and such on my machine (ftp.example.com for example) but my domain does not appear from outside and dns viewing tools from outside don't find any A records on the nameserver my vps provider gave me.

I even thought about running my own nameserver at least for now but godaddy does not let you enter numeric addresses for the nameserver so that would not help even if I was able to set that up correctly.

At this point I think what I have is correct so I'm going to wait over the weekend to see if things work themselves out. I would think that my updates to the local nameserver should happen quickly but maybe not.
 
Old 02-15-2013, 05:55 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
The local nameserver would happen as soon as you restart it.

For outside access to work the server must be known to its parent domain.

If you have registered your own domain - then that registration would handle it. Most registrars require two servers though - a primary, and a secondary.

Such registration can take a day or two (they have to get their danegeld first). If your domain is xyz.com, you can do a "dig xyz.com" and it will query the "com" domain for your server.
 
Old 02-15-2013, 06:01 PM   #7
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,685
Blog Entries: 10

Rep: Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080Reputation: 2080
the actual domain name would be helpful also.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Domain re-directing using DNS ZAMO Linux - Server 1 07-21-2010 10:20 AM
[SOLVED] Mail server blocks me: warning: numeric domain name in resource data of MX record deathsfriend99 Linux - Server 1 02-04-2010 11:53 AM
Directing a domain to a subfolder kaligula1234 Linux - Server 3 11-05-2009 05:57 PM
Directing a domain to a port? Zeno McDohl Linux - Server 1 12-09-2008 04:03 PM


All times are GMT -5. The time now is 10:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration