Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #1387 > unrolled thread

bind server problem

Started byJulien Mills <julienfmills@yahoo.com>
First post2012-05-22 18:23 +0000
Last post2012-05-24 23:58 +0100
Articles 12 — 5 participants

Back to article view | Back to comp.os.linux.networking


Contents

  bind server problem Julien Mills <julienfmills@yahoo.com> - 2012-05-22 18:23 +0000
    Re: bind server problem Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-05-22 20:46 +0000
      Re: bind server problem Julien Mills <julienfmills@yahoo.com> - 2012-05-23 14:11 +0000
        Re: bind server problem Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-05-23 15:36 +0000
    Re: bind server problem Whiskers <catwheezel@operamail.com> - 2012-05-22 20:58 +0000
      Re: bind server problem Julien Mills <julienfmills@yahoo.com> - 2012-05-23 14:39 +0000
        Re: bind server problem Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-05-23 11:21 -0600
          Re: bind server problem Julien Mills <julienfmills@yahoo.com> - 2012-05-24 19:07 +0000
            Re: bind server problem Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-05-25 00:10 -0600
    Re: bind server problem Chris Davies <chris-usenet@roaima.co.uk> - 2012-05-24 15:49 +0100
      Re: bind server problem Julien Mills <julienfmills@yahoo.com> - 2012-05-24 19:36 +0000
        Re: bind server problem Chris Davies <chris-usenet@roaima.co.uk> - 2012-05-24 23:58 +0100

#1387 — bind server problem

FromJulien Mills <julienfmills@yahoo.com>
Date2012-05-22 18:23 +0000
Subjectbind server problem
Message-ID<jpgljt$pr1$1@speranza.aioe.org>
Hey all,

I have a caching bind dns (and dhcpd) server running on a Slackware box. 
It works great, almost.

My website is hosted off-site.

In a browser when I type: www.example.com it works, I get to my website.  
If I type example.com (without the www) it does not work.

Does anyone know how I can set up the dns to make this work? 

Thanks

[toc] | [next] | [standalone]


#1388

FromJorgen Grahn <grahn+nntp@snipabacken.se>
Date2012-05-22 20:46 +0000
Message-ID<slrnjrnuos.rk7.grahn+nntp@frailea.sa.invalid>
In reply to#1387
On Tue, 2012-05-22, Julien Mills wrote:
> Hey all,
>
> I have a caching bind dns (and dhcpd) server running on a Slackware box. 
> It works great, almost.
>
> My website is hosted off-site.
>
> In a browser when I type: www.example.com it works, I get to my website.  
> If I type example.com (without the www) it does not work.
>
> Does anyone know how I can set up the dns to make this work? 

Do you want example.com to resolve only when you use your caching name
server, or do you want it to work for everyone, from anywhere?  I'm
pretty sure a caching-only name server can't make the latter happen.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

[toc] | [prev] | [next] | [standalone]


#1390

FromJulien Mills <julienfmills@yahoo.com>
Date2012-05-23 14:11 +0000
Message-ID<jpir6p$f0m$1@speranza.aioe.org>
In reply to#1388
On Tue, 22 May 2012 20:46:21 +0000, Jorgen Grahn wrote:

> On Tue, 2012-05-22, Julien Mills wrote:
>> Hey all,
>>
>> I have a caching bind dns (and dhcpd) server running on a Slackware
>> box. It works great, almost.
>>
>> My website is hosted off-site.
>>
>> In a browser when I type: www.example.com it works, I get to my
>> website. If I type example.com (without the www) it does not work.
>>
>> Does anyone know how I can set up the dns to make this work?
> 
> Do you want example.com to resolve only when you use your caching name
> server, or do you want it to work for everyone, from anywhere?  I'm
> pretty sure a caching-only name server can't make the latter happen.
> 
> /Jorgen

Not quite sure what you mean. I want it work for all our users behind our 
firewall.  Our dns server is only available locally.  Is that what you 
mean? 

Thanks,

Julein

[toc] | [prev] | [next] | [standalone]


#1392

FromJorgen Grahn <grahn+nntp@snipabacken.se>
Date2012-05-23 15:36 +0000
Message-ID<slrnjrq10r.rk7.grahn+nntp@frailea.sa.invalid>
In reply to#1390
On Wed, 2012-05-23, Julien Mills wrote:
> On Tue, 22 May 2012 20:46:21 +0000, Jorgen Grahn wrote:
>
>> On Tue, 2012-05-22, Julien Mills wrote:
>>> Hey all,
>>>
>>> I have a caching bind dns (and dhcpd) server running on a Slackware
>>> box. It works great, almost.
>>>
>>> My website is hosted off-site.
>>>
>>> In a browser when I type: www.example.com it works, I get to my
>>> website. If I type example.com (without the www) it does not work.
>>>
>>> Does anyone know how I can set up the dns to make this work?
>> 
>> Do you want example.com to resolve only when you use your caching name
>> server, or do you want it to work for everyone, from anywhere?  I'm
>> pretty sure a caching-only name server can't make the latter happen.
>> 
>> /Jorgen
>
> Not quite sure what you mean. I want it work for all our users behind our 
> firewall.  Our dns server is only available locally.  Is that what you 
> mean? 

Yes, that was what was unclear. The part about users behind a firewall
was missing from the original question.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

[toc] | [prev] | [next] | [standalone]


#1389

FromWhiskers <catwheezel@operamail.com>
Date2012-05-22 20:58 +0000
Message-ID<slrnjrnvgo.s0.catwheezel@ID-107770.user.individual.net>
In reply to#1387
On 2012-05-22, Julien Mills <julienfmills@yahoo.com> wrote:
> Hey all,
>
> I have a caching bind dns (and dhcpd) server running on a Slackware box. 
> It works great, almost.
>
> My website is hosted off-site.
>
> In a browser when I type: www.example.com it works, I get to my website.  
> If I type example.com (without the www) it does not work.
>
> Does anyone know how I can set up the dns to make this work? 
>
> Thanks

Have you got an entry specifically for www.example.com but not for the
general example.com?

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~

[toc] | [prev] | [next] | [standalone]


#1391

FromJulien Mills <julienfmills@yahoo.com>
Date2012-05-23 14:39 +0000
Message-ID<jpisrs$k36$1@speranza.aioe.org>
In reply to#1389
On Tue, 22 May 2012 20:58:40 +0000, Whiskers wrote:

> On 2012-05-22, Julien Mills <julienfmills@yahoo.com> wrote:
>> Hey all,
>>
>> I have a caching bind dns (and dhcpd) server running on a Slackware
>> box. It works great, almost.
>>
>> My website is hosted off-site.
>>
>> In a browser when I type: www.example.com it works, I get to my
>> website. If I type example.com (without the www) it does not work.
>>
>> Does anyone know how I can set up the dns to make this work?
>>
>> Thanks
> 
> Have you got an entry specifically for www.example.com but not for the
> general example.com?

There's an entry for www and an entry for example.com.

www                A       100.10.11.12
example.com        A       100.10.11.12

I believe that bind automatically put them in there, is that possible? 

Just did a little testing, from a Windows machine here on our network 
www.example.com works, example.com does not.  This makes no sense to me.

I want both to work, mainly because Google is returning example.com so I 
want that to work.

[toc] | [prev] | [next] | [standalone]


#1393

FromJoe Pfeiffer <pfeiffer@cs.nmsu.edu>
Date2012-05-23 11:21 -0600
Message-ID<1blikig6dz.fsf@pfeifferfamily.net>
In reply to#1391
Julien Mills <julienfmills@yahoo.com> writes:

> On Tue, 22 May 2012 20:58:40 +0000, Whiskers wrote:
>
>> On 2012-05-22, Julien Mills <julienfmills@yahoo.com> wrote:
>>> Hey all,
>>>
>>> I have a caching bind dns (and dhcpd) server running on a Slackware
>>> box. It works great, almost.
>>>
>>> My website is hosted off-site.
>>>
>>> In a browser when I type: www.example.com it works, I get to my
>>> website. If I type example.com (without the www) it does not work.
>>>
>>> Does anyone know how I can set up the dns to make this work?
>>>
>>> Thanks
>> 
>> Have you got an entry specifically for www.example.com but not for the
>> general example.com?
>
> There's an entry for www and an entry for example.com.
>
> www                A       100.10.11.12
> example.com        A       100.10.11.12
>
> I believe that bind automatically put them in there, is that possible? 
>
> Just did a little testing, from a Windows machine here on our network 
> www.example.com works, example.com does not.  This makes no sense to me.
>
> I want both to work, mainly because Google is returning example.com so I 
> want that to work.

Unless you've got a good reason to use bind I highly recommend switching
to dnsmasq.  It's roughly an order of magnitude easier to configure.

As to your particular problem, it's hard to guess what's going on from
two lines plucked from your config file.  But, if those two lines are
really next to each other, I'm guessing they're inside a zone defined
for example.com.  If I'm right in that guess, you've defined resource
records for www.example.com. and example.com.example.com.  If you
replace the second line with

@        A 100.10.11.12

it should work (the @ says 'use the root of the domain').

Also, if you'd used

example.com.         A       100.10.11.12

(note the period after the hostname) is would have worked.

[toc] | [prev] | [next] | [standalone]


#1397

FromJulien Mills <julienfmills@yahoo.com>
Date2012-05-24 19:07 +0000
Message-ID<jpm0u3$in9$1@speranza.aioe.org>
In reply to#1393
Joe,

>>>>
>>>> I have a caching bind dns (and dhcpd) server running on a Slackware
>>>> box. It works great, almost.
>>>>
>>>> My website is hosted off-site.
>>>>
>>>> In a browser when I type: www.example.com it works, I get to my
>>>> website. If I type example.com (without the www) it does not work.
>>>>
>>>> Does anyone know how I can set up the dns to make this work?
>>>>
>>>> Thanks
>>> 
>>> Have you got an entry specifically for www.example.com but not for the
>>> general example.com?
>>
>> There's an entry for www and an entry for example.com.
>>
>> www                A       100.10.11.12 example.com        A      
>> 100.10.11.12
>>
>> I believe that bind automatically put them in there, is that possible?
>>
>> Just did a little testing, from a Windows machine here on our network
>> www.example.com works, example.com does not.  This makes no sense to
>> me.
>>
>> I want both to work, mainly because Google is returning example.com so
>> I want that to work.
> 
> Unless you've got a good reason to use bind I highly recommend switching
> to dnsmasq.  It's roughly an order of magnitude easier to configure.
> 
> As to your particular problem, it's hard to guess what's going on from
> two lines plucked from your config file.  But, if those two lines are
> really next to each other, I'm guessing they're inside a zone defined
> for example.com.  If I'm right in that guess, you've defined resource
> records for www.example.com. and example.com.example.com.  If you
> replace the second line with
> 
> @        A 100.10.11.12
> 
> it should work (the @ says 'use the root of the domain').
> 
> Also, if you'd used
> 
> example.com.         A       100.10.11.12
> 
> (note the period after the hostname) it would have worked.

You are exactly correct in everything you say here, your guesses and 
conclusions.  Both of your solutions work perfectly.  

Thank you very much.  I am so glad to get this going. 

Thanks again.

[toc] | [prev] | [next] | [standalone]


#1403

FromJoe Pfeiffer <pfeiffer@cs.nmsu.edu>
Date2012-05-25 00:10 -0600
Message-ID<1by5og3i5m.fsf@pfeifferfamily.net>
In reply to#1397
Julien Mills <julienfmills@yahoo.com> writes:
>
> Thank you very much.  I am so glad to get this going. 

You're very welcome!

[toc] | [prev] | [next] | [standalone]


#1395

FromChris Davies <chris-usenet@roaima.co.uk>
Date2012-05-24 15:49 +0100
Message-ID<jcu199xlmt.ln2@news.roaima.co.uk>
In reply to#1387
Julien Mills <julienfmills@yahoo.com> wrote:
> I have a caching bind dns (and dhcpd) server running on a Slackware box. 
> It works great, almost.

> In a browser when I type: www.example.com it works, I get to my website.  
> If I type example.com (without the www) it does not work.

What do you mean by "it does not work"? There are at least two different
potential issues here.

    1. DNS entries: is there a DNS 'A' record for both www.example.com
    and example.com, and do both resolve to the same IP address. (This
    is what the other posts here seem to be concentrating on.)

    2. Web configuration: many websites these days are configured to be
    able to run multiple websites from the same IP address. Consequently,
    unless you tell the webserver to accept requests for www.example.com
    AND example.com, it won't have any content to deliver to you.

You can confirm #1 by running the following commands and visually
confirming that you get the same external address reported for both
questions:

	dig +short a www.example.com
	dig +short a example.com

You can confirm #2 either by checking the configuration files for your
webserver, or empirically as follows. First, you need to obtain the
correct IP address for your server. In this example I'm going to assume
it's 10.11.12.13:

(a)

	nc -vvv 10.11.12.13 80	# "telnet 10.11.12.13 80"
	GET / HTTP/1.0
	Host: www.example.com

(b)
	nc -vvv 10.11.12.13 80
	GET / HTTP/1.0
	Host: example.com

In both cases you'll need to hit Return a couple of times at the end
(i.e. there needs to be a blank line after the Host: line).

If you get the same content from both requests then your web server is
configured as you hope. If you don't then it isn't.

Chris

[toc] | [prev] | [next] | [standalone]


#1398

FromJulien Mills <julienfmills@yahoo.com>
Date2012-05-24 19:36 +0000
Message-ID<jpm2kg$n5b$1@speranza.aioe.org>
In reply to#1395
On Thu, 24 May 2012 15:49:23 +0100, Chris Davies wrote:

> Julien Mills <julienfmills@yahoo.com> wrote:
>> I have a caching bind dns (and dhcpd) server running on a Slackware
>> box. It works great, almost.
> 
>> In a browser when I type: www.example.com it works, I get to my
>> website. If I type example.com (without the www) it does not work.
> 
> What do you mean by "it does not work"? There are at least two different
> potential issues here.
> 
>     1. DNS entries: is there a DNS 'A' record for both www.example.com
>     and example.com, and do both resolve to the same IP address. (This
>     is what the other posts here seem to be concentrating on.)
> 
>     2. Web configuration: many websites these days are configured to be
>     able to run multiple websites from the same IP address.
>     Consequently, unless you tell the webserver to accept requests for
>     www.example.com AND example.com, it won't have any content to
>     deliver to you.
> 
> You can confirm #1 by running the following commands and visually
> confirming that you get the same external address reported for both
> questions:
> 
> 	dig +short a www.example.com
> 	dig +short a example.com
> 
> You can confirm #2 either by checking the configuration files for your
> webserver, or empirically as follows. First, you need to obtain the
> correct IP address for your server. In this example I'm going to assume
> it's 10.11.12.13:
> 
> (a)
> 
> 	nc -vvv 10.11.12.13 80	# "telnet 10.11.12.13 80" GET / HTTP/1.0
> 	Host: www.example.com
> 
> (b)
> 	nc -vvv 10.11.12.13 80
> 	GET / HTTP/1.0
> 	Host: example.com
> 
> In both cases you'll need to hit Return a couple of times at the end
> (i.e. there needs to be a blank line after the Host: line).

Chris,

Thank you for this helpful answer.  It turns out my problem is #1, dns 
entries for my web site were not working, Joe helped me fix that.  I like 
the "+short a", makes it neater.

And I ran your tests for #2, it turns out the web site is configured to 
handle both cases properly which is good to know.  Thanks for those 
tests. nc is very useful. 


Julien

[toc] | [prev] | [next] | [standalone]


#1399

FromChris Davies <chris-usenet@roaima.co.uk>
Date2012-05-24 23:58 +0100
Message-ID<02r299xpi7.ln2@news.roaima.co.uk>
In reply to#1398
Julien Mills <julienfmills@yahoo.com> wrote:
> Thank you for this helpful answer.  It turns out my problem is #1, dns 
> entries for my web site were not working, Joe helped me fix that.  I like 
> the "+short a", makes it neater.

No problem.


> And I ran your tests for #2, it turns out the web site is configured to 
> handle both cases properly which is good to know.  Thanks for those 
> tests. nc is very useful. 

Nc (aka netcat) is a very powerful tool for building or testing network
connections. It's worth taking a look at its capabilities (don't aim
to memorise the manual though!) so you know what's possible. Socat is
another really useful network tool, but IMO the syntax is complex and
really hard to get one's head around.

Chris

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.networking


csiph-web