Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've setup a dynamic DNS service with DynDNS, let's call it:

foobar.dyndns.net

When I setup a Linux server, what should be my hostname and domain name??

For instance, if I setup Slackware Linux, the installation program asks for them, and if I enter "foobar.dyndns.net" for the hostname and domain name, the installation sets up my server as "foobar.dyndns.net.foobar.dyndns.net", which obviously doesn't look right.

What is the correct way to do this when using dynamic DNS? If I use "foobar" as the hostname, and "dyndns.net" as the domain name, it doesn't seem right either, as I don't really "own" or exercise control over the domain "dyndns.net".

Thanks for your answers.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

When I used DynDNS for their free dynamic service, I used foobar.dyndns.net as the domain and had the wildcard redirect enabled. That let everything work more or less transparently, since I could have local DNS and use vhosts to make sites appear at the same URLs on the inside and the outside.

crb is completely correct that you can use whatever you want as an internal domain, but this setup always worked well for me. I think wildcard requires paying now or something, though; in which case this is markedly less useful. ;)

share|improve this answer
    
P.S. and the hostname being whatever hostname you like; my naming scheme at the time was 17th century scientists and philosphers. So boyle, bacon, descartes, etc. –  Michael Lowman Jul 15 '11 at 16:14

There need be no connection between any external DNS name and any hostnames/internal DNS.

What you call the hostname (sometimes the 'local part'), should be alphanumeric, no dots. There's a whole RFC on how to pick a name.

Your DNS suffix ('domain name') is added to hostnames when you try and resolve them. As you say, even if you have servers 'foo' and 'bar', it doesn't help you to type 'ping baz' and get a different dyndns.net customer. (It doesn't hurt either.)

It is possible to select your own internal domain - I personally tend to use something at '.tla' from habit, as it's not ever going to conflict with anything on the Internet. Don't use .local, as that has a specific meaning.

share|improve this answer
    
So do you mean I can have anything, say, "abc.def.ghi" for my hostname, and my existing "foobar.dyndns.net" for my domain name during server setup? If so, to connect to the server I would use "foobar.dyndns.net" regardless of what I setup the hostname to be? Or would it become "abc.def.ghi.foobar.dyndns.net"? –  hpy Jul 15 '11 at 15:32
2  
Your hostname should be whatever you want to name your computer. Your DNS suffix should be whatever domain you're on, or make one up if you're not in a domain. I recommend you take a look at this dev.slackware.it/docs/howto.php?page=16 –  Daniel Ball Jul 15 '11 at 15:44
2  
What crb is saying is that your internal and external domain name are two different things. What dyndns does is receive requests for foobar.dyndns.com and forward them to your router's external IP. You then need to tell your router that requests on port 80(or whatever else you need) are forwarded to your server. Your hostname and dns suffix for your server are separate, dyndns won't even know what they are (nor should it). –  Daniel Ball Jul 15 '11 at 15:46
    
Clarified a little that the hostname should be a single alphanumeric, no .s –  crb Jul 15 '11 at 15:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.