Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
An easy DNS question...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Sat May 01, 2004 4:04 am    Post subject: An easy DNS question... Reply with quote

I have a domain name I just officially registered, and I have a host record registered over at dyndns.org that points to my IP address (I have a dynamic IP so I use dyndns to keep it up to date). Right now I am only using this domain name to access one server that is running squirrelmail. Let's call this server "server.example.com."

What I want to do is to be able to point my browser to "https://example.com/squirrelmail" and get to the squirrelmail page hosted by server.example.com. The problem is, when I do that, I get an error saying that "server.example.com cannot be found." I found that to alleviate this problem, I had to add another host record at dyndns.org for "server.example.com" alongside the existing "example.com" that points to the same IP address. This works.

So what's my question? Well, I was wondering if this was the "standard" way to solve this problem. After experiencing this issue I got to thinking... how does any other website handle this? If I go to a site called "website.com," when the real webserver on the domain website.com has the FQDN "webserver.website.com," how do they have it set up so that typing "http://website.com" into my browser takes me directly to "http://webserver.website.com," while my browser still shows that I am at "http://website.com?" I hope that makes sense. I was just wondering if site owners maintain two records, one for website.com and one for webserver.website.com, or if there is a different way to go about it? Thanks for any answers to my dumb question ;)
Back to top
View user's profile Send private message
wmgoree
Apprentice
Apprentice


Joined: 08 Aug 2003
Posts: 246
Location: Alexandria, VA

PostPosted: Sat May 01, 2004 5:21 am    Post subject: Re: An easy DNS question... Reply with quote

Caveat: this is just how the company I work for runs our name servers.

That said, in the example.com zone file there is usually something like:

example.com. IN A 123.45.67.89
server.example.com. IN A 123.45.67.89

Remember that a particular box's "real" FQDN doesn't matter; if website.com and www.website.com have the same A record, BIND could care less which one the server calls itself.

Play around with the "dig" tool sometime to see what other dns admins have done; it can be quite enlightening.
_________________
vi? *snicker* it doesn't even include a mail reader...
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Sat May 01, 2004 6:49 am    Post subject: Re: An easy DNS question... Reply with quote

wmgoree wrote:
Caveat: this is just how the company I work for runs our name servers.

That said, in the example.com zone file there is usually something like:

example.com. IN A 123.45.67.89
server.example.com. IN A 123.45.67.89

Remember that a particular box's "real" FQDN doesn't matter; if website.com and www.website.com have the same A record, BIND could care less which one the server calls itself.

Play around with the "dig" tool sometime to see what other dns admins have done; it can be quite enlightening.

Thanks for the insight. That all makes sense, but I guess what I was wondering was why, if I have the host record example.com set up at dyndns.org to point to IP address 12.34.56.78, my browser returns a 404 error when attempting to visit example.com unless I also add the host record server.example.com to point to 12.34.56.78. It is resolving the right IP address after all, so shouldn't that be enough? I'm a little confused...
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sat May 01, 2004 10:26 am    Post subject: Reply with quote

I know it is possible to redirect a domain and all it's subdomains:
example.com and all *.example.com will resolve to the same point. (dyns.cx does this)

However, I don't know how to do this in BIND. Anyone? (I'm interested)
Back to top
View user's profile Send private message
wmgoree
Apprentice
Apprentice


Joined: 08 Aug 2003
Posts: 246
Location: Alexandria, VA

PostPosted: Sat May 01, 2004 1:41 pm    Post subject: Reply with quote

nielchiano wrote:
I know it is possible to redirect a domain and all it's subdomains:
example.com and all *.example.com will resolve to the same point. (dyns.cx does this)

However, I don't know how to do this in BIND. Anyone? (I'm interested)


example.com. IN A 123.45.67.89
*.example.com. IN A 123.45.67.89
_________________
vi? *snicker* it doesn't even include a mail reader...
Back to top
View user's profile Send private message
wmgoree
Apprentice
Apprentice


Joined: 08 Aug 2003
Posts: 246
Location: Alexandria, VA

PostPosted: Sat May 01, 2004 1:43 pm    Post subject: Re: An easy DNS question... Reply with quote

GetCool wrote:
Why, if I have the host record example.com set up at dyndns.org to point to IP address 12.34.56.78, my browser returns a 404 error when attempting to visit example.com unless I also add the host record server.example.com to point to 12.34.56.78. It is resolving the right IP address after all, so shouldn't that be enough? I'm a little confused...


This is just a guess based on what you said (I'd have to see all your conf and zone files to know more), but I would guess that when your browser connects to example.com your server is redirecting to server.example.com/squirrelmail. That is, my hunch is to hunt for this bug in apache, not bind.
_________________
vi? *snicker* it doesn't even include a mail reader...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum