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.
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.
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. ;)