 |
Linux Format forums Help, discussion, magazine feedback and more
|
| View previous topic :: View next topic |
| Author |
Message |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Thu Jan 19, 2012 9:57 pm Post subject: Internal/External Network configuration |
|
|
ServerA (192.168.0.1) has a wireless connection to the Internet.
A home-brew DNS ServerB (192.168.0.2) runs Bind for internal host names resolution, with its default gateway set to .1
My DesktopA (192.168.0.50) has 192.168.0.2 set as its name server in /etc/resolve.conf. It also knows that ServerA is the default gateway, and has that IP address (.1) configured accordingly.
A DesktopB (192.168.0.51) also exists and is similarly configured
From my desktop, I can do 'ping DesktopB' and it resolves that to the .51 address and gets a return happily. Same thing in reverse (i.e., DesktopB can ping DesktopA by name, without issue).
If either desktop says "ping www.google.com", however, we get nothing. Internal names are resolved, in other words, but nothing which points outside the building.
I am unclear how to configure the DNS server to say, "I cannot resolve this, so let me pass it on to the external (ISP) nameservers", especially when to do so would require the DNS server to know to route the request via ServerA and its wireless connection. (Which it's supposed to, because it's been told that ServerA is the default gateway and it knows from the forwarders section of named.conf what the ISP's nameservers' IP addresses are).
All machines are running Centos 6.2, 64-bit. All have .1 configured as the default gateway. The ServerB has itself configured as its DNS1 server in /netword-scripts/ifcfg-eth0, but does have "forward first;" and "forwarders { 61.9.211.1; 61.9.195.193; };" set in its named.conf (those are the IP addresses of my ISP's dns servers).
Any guidance, please, would be appreciated. |
|
| Back to top |
|
 |
wyliecoyoteuk LXF regular

Joined: Sun Apr 10, 2005 11:41 pm Posts: 3358 Location: Birmingham, UK
|
Posted: Thu Jan 19, 2012 10:14 pm Post subject: |
|
|
It is basically how you set authoritative servers.
if you set a server as authoritative for your domain, it should function for your internal domain and pass everything else outside _________________ The sig between the asterisks is so cool that only REALLY COOL people can even see it!
*************** ************ |
|
| Back to top |
|
 |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Thu Jan 19, 2012 10:28 pm Post subject: |
|
|
Yup. That's what I've done (or thought I'd done).
In named.conf, I have:
| Code: | zone "." IN {
type hint;
file "named.ca";
};
zone "mydomain.home" {
type master;
file "mydomainl.hosts";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "192.168.0.reverse";
}; |
So, queries for 'mydomain.home' should be resolved internally (and are), and queries for 'google.com' ought to be handled by the ". zone", and thus by the 'named.ca' file, which ships with bind and which is, I think, a list of root servers which I haven't altered. But it's this second bit which doesn't work.
The DNS server knows where the default gateway is, so it ought to know how to reach those external servers, but somehow it doesn't.
I guess my specific questions are 1. What should the DNS server have listed in ifcfg-eth0 for its DNS1 (i.e., is it right for my DNS server to refer to itself); 2. Should the default gateway have my internal DNS server set as *its* DNS entry, or should it be using the external ISP servers? |
|
| Back to top |
|
 |
wyliecoyoteuk LXF regular

Joined: Sun Apr 10, 2005 11:41 pm Posts: 3358 Location: Birmingham, UK
|
Posted: Thu Jan 19, 2012 10:35 pm Post subject: |
|
|
have you set a secondary server? _________________ The sig between the asterisks is so cool that only REALLY COOL people can even see it!
*************** ************ |
|
| Back to top |
|
 |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Thu Jan 19, 2012 10:37 pm Post subject: |
|
|
Do you mean a secondary internal DNS server?
No, if so. There's just the one. |
|
| Back to top |
|
 |
wyliecoyoteuk LXF regular

Joined: Sun Apr 10, 2005 11:41 pm Posts: 3358 Location: Birmingham, UK
|
Posted: Thu Jan 19, 2012 10:44 pm Post subject: |
|
|
Not a DNS expert, but I think you should set the secondary server as an external or edge one, unless your authoritative server is external or a router.
e.g. our internal DNS server is our DC, the secondary server is the smoothwall router, which functions as a DNS relay.
could be wrong _________________ The sig between the asterisks is so cool that only REALLY COOL people can even see it!
*************** ************ |
|
| Back to top |
|
 |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Thu Jan 19, 2012 10:54 pm Post subject: |
|
|
I don't have a secondary DNS server.
I'm not clear what you're suggesting I do. Sorry.
I have one internal DNS server that is authoritative for my internal domain. I need it to be able to forward requests via the default gateway when they relate to external domains.
The internal DNS server knows the default gateway address. It also knows to forward to my ISP's servers for non-internal requests, but doesn't appear to do so:
(Incidentally, if I change my desktop's resolv.conf and point it to an old Centos 4.8 server that's running an older version of bind in an almost-identical configuration, this is what happens:
| Code: | [root@dirac ~]# nslookup www.google.com
Server: 192.168.0.71
Address: 192.168.0.71#53
Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 74.125.237.145
Name: www.l.google.com
Address: 74.125.237.146
Name: www.l.google.com
Address: 74.125.237.147
Name: www.l.google.com
Address: 74.125.237.148
Name: www.l.google.com
Address: 74.125.237.144 |
I could live with my Centos 4.8 box, I suppose... but it's nearing end-of-life as an O/S, so I'd like to get my Centos 6.2 version working the same way.) |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8000 Location: Warrington, UK
|
Posted: Thu Jan 19, 2012 10:59 pm Post subject: |
|
|
Bind is way over the top for what you are trying to do, and causes the complication you are running into. dnsmasq is designed for just this job and is a complete doddle to set up compared to Bind. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Thu Jan 19, 2012 11:06 pm Post subject: |
|
|
Not really. I have 28 different virtual machines to deal with, in addition to 6 different physical ones. And there will be more than that over time. Plus I want to know bind for when I use it at work.
Aside from that, bind is really fairly easy to configure (or, at least, was back in centos 4.8 days). It's getting what did work to work in the newer version that's the issue.
So my question about getting bind to work still remains, really... (I find changing car tyres a challenge; I don't just go buy a new car when I get a puncture, though!) |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 8000 Location: Warrington, UK
|
Posted: Fri Jan 20, 2012 1:39 am Post subject: |
|
|
No, but you do consider the use for it before you choose the type of car. dnsmasq works extremely well with a large local network, the point being that it is designed for just this task, a local name server, and as such works pretty well straight out of the box. However, if you have a particular need to use Bind, that puts a different complexion on things. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Fri Jan 20, 2012 2:29 am Post subject: |
|
|
OK, different analogy then.
If I asked a question about having trouble getting Photoshop to work properly, I doubt you'd consider "far too complex a program; use MS Paint instead" to be a reasonable reply!
My question is about getting bind to work with external addresses. It doesn't matter if you think bind is the wrong program to use or that there are 57 better ways to do names resolution; even if all of that was objectively true, I would still be left with the problem of getting bind to work!
I'm not trying to be snotty about it (and apologise in advance if that's the way it comes across). I just think if someone asks 'how do I do X', it's not always very helpful to tell them that actually they ought to be doing 'A' instead. Especially when 'X' is perfectly respectable, used widely and is something generally considered to be worthwhile.
One day, especially given your recommendation, I may well take a look at dnsmasq. But right now, my problem is with bind... and I'd really appreciate some help on that! |
|
| Back to top |
|
 |
Dutch_Master LXF regular
Joined: Tue Mar 27, 2007 2:49 am Posts: 2353
|
Posted: Fri Jan 20, 2012 3:30 am Post subject: |
|
|
Right. The CentOS server is still working, as you've said. Bind is unlikely to have changed its config files significantly in the time between setting both servers up, so you may get a hint on what Bind config you need for server B by looking at the CentOS server. In fact, you just may as well copy it straight in Perhaps now is also a good time to take a look at the log files to see why it can't resolve...  |
|
| Back to top |
|
 |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Fri Jan 20, 2012 4:14 am Post subject: |
|
|
Been there, tried that. Copying the old config across to the new, I mean. There are some syntactical differences which make absolutely blind copying merely generate errors, but as far as I can tell, they're functionally equivalent.
Diito with /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/resolv.conf: identical on both old (working) and new (non-functional) machines.
In terms of logging on the Centos 6.2 box, I get lots of this:
| Code: | validating @0xb5848a98: . NS: got insecure response; parent indicates it should be secure
error (insecurity proof failed) resolving './NS/IN': 61.9.211.1#53
error (no valid RRSIG) resolving 'com/DS/IN': 61.9.195.193#53
validating @0xb5848a98: . NS: got insecure response; parent indicates it should be secure
error (insecurity proof failed) resolving './NS/IN': 61.9.195.193#53
error (no valid RRSIG) resolving 'com/DS/IN': 61.9.211.1#53
validating @0xb544abe8: . DNSKEY: got insecure response; parent indicates it should be secure
error (insecurity proof failed) resolving './DNSKEY/IN': 61.9.195.193#53
validating @0xb544abe8: . DNSKEY: got insecure response; parent indicates it should be secure
error (insecurity proof failed) resolving './DNSKEY/IN': 61.9.211.1#53
validating @0xb5848a98: com SOA: got insecure response; parent indicates it should be secure
error (no valid RRSIG) resolving 'google.com/DS/IN': 61.9.195.193#53
validating @0xb5848a98: com SOA: got insecure response; parent indicates it should be secure
error (no valid RRSIG) resolving 'google.com/DS/IN': 61.9.211.1#53 |
...ending with this:
| Code: | error (no valid RRSIG) resolving 'google.com/DS/IN': 192.12.94.30#53
error (no valid DS) resolving 'google.com/A/IN': 61.9.211.1#53
validating @0xb59006a0: google.com A: bad cache hit (google.com/DS)
error (broken trust chain) resolving 'google.com/A/IN': 61.9.195.193#53 |
I don't really know what any of that means, though. The 61... addresses mentioned are those of my ISP's DNS servers.
I suppose the good news is that the broken DNS box does seem to want to talk to the outside world after all! Not sure what to re-configure to sort out its sense of broken trust, though!
Thanks for prompting me to look at the logs! |
|
| Back to top |
|
 |
dizwell
Joined: Wed Aug 03, 2005 12:05 am Posts: 61
|
Posted: Fri Jan 20, 2012 4:53 am Post subject: Solved |
|
|
I've sorted it.
DNSSEC is to blame (or my ISP is, depending on how you look at it).
In the default named.conf for bind 9.7 are these three lines:
| Code: | dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto; |
I changed the values of the first two parameters to 'no', did a service named restart and... immediately external pings started working.
The clue was in the logs (thanks for making me look, as I said!). The fact that it was *expecting* a secure response and wasn't getting one made me check http://lists.fedoraproject.org/pipermail/users/2010-November/386854.html and all the talk there about DNSSEC made me lookup how to switch it off.
From what I've read, DNSSEC was baked into Bind around version 9.6. The version on my Centos 4.8 box was 9.2, the version shipped with Centos 6.2 is 9.7... so one doesn't have DNSSEC support (or issues with it!), and the other does.
I suppose my new question now is why this country's largest Telco doesn't appear to support DNSSEC... but I don't feel like battling their tech support to find out!
Last edited by dizwell on Fri Jan 20, 2012 6:19 am; edited 1 time in total |
|
| Back to top |
|
 |
Dutch_Master LXF regular
Joined: Tue Mar 27, 2007 2:49 am Posts: 2353
|
Posted: Fri Jan 20, 2012 5:22 am Post subject: |
|
|
Glad you got it sorted  |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|