DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 26th, 2004, 07:47 AM
cbchev68 cbchev68 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: NH
Posts: 228 cbchev68 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 25 m 38 sec
Reputation Power: 6
DNS and NAT config question.

Hello,

I am running Bind 9.2.1 on RH9. I've run into an interesting configuration issue/design that I cant quite figure out.

My network consists of a public side, and a private site. All of my servers (DNS, email, httpd, etc.) have been on the public side, so it was straightforward to have all DNS entries resolve to publically viewable IP's.

Now I have setup a server on the inside. This server will be mapped across NAT to a public IP..

I'm trying to figure out if there is a way to have the name resolve to an private IP, if sourced from the inside, and the public IP if sourced from the outside.

Right now I am using hosts files to circumvent the issue, but I'd ike to only have to worry about 1 name database if there was a change, rather than 25 or so host files

My only thought was to setup another DNS server for the inside, and configure it to resolve those servers, and forward all other requests to the outside DNS servers. This of course leads to more admin overhead, as there is 1 or 2 more servers to monitor and maintain.

Any other thoughts or ideas on how to accomplish this?

Thanks for any and all feedback.

Reply With Quote
  #2  
Old July 26th, 2004, 11:29 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,193 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 14 h 35 m 27 sec
Reputation Power: 77
I really need to put a tutorial in the server setup post about this. BIND offers a solution in the form of "views". Here's my server configuration. Notice how I put it to use.

http://www.dollardns.net/bind/advanced/named.conf

I used match-destination, but you can also use CIDR network values in matching the source.
__________________
Send me a private message if you would like me to setup your DNS for you for a price of your choosing. This is the preferred method if your DNS needs to be fixed/setup fast and you don't have the time to bounce messages back and forth on a forum. Also, check out these links:

Whois Direct | DNS Crawler | NS Trace | Compare Free DNS Hosts

Reply With Quote
  #3  
Old July 27th, 2004, 08:56 AM
cbchev68 cbchev68 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: NH
Posts: 228 cbchev68 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 25 m 38 sec
Reputation Power: 6
Ok.. After doing some research, I *think* I understand the concept of views.. Let me know if my logic is correct.

The 'view' will be created outside of the current zone blocks. In that view I will define the match-client IP, and create a new zone file for that view. In that zone file, I will create the records I need, for my inside address's.. Is that right?


Attached is an example of my thinking.. All clients from 66.63.110.59 (my nat'ed address) will be served records from the file 'server-testing.com.zone-inside' file. Everyone else will be from server-testing.com.zone?

And lastly, how will this affect resolution of the other zones, from 66.63.110.59, that my server is authoritative for?
Attached Files
File Type: txt named.conf.txt (312 Bytes, 258 views)

Last edited by cbchev68 : July 27th, 2004 at 10:20 AM.

Reply With Quote
  #4  
Old July 27th, 2004, 09:58 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,193 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 14 h 35 m 27 sec
Reputation Power: 77
you almost got the right idea. However, if you're using views, ALL zone blocks must be inside of a view. So you'll need at least 2 view blocks, a public and a private. Each public zone goes into the public view. Each private zone goes into the private view. Each public AND private zone goes into both - each with their own zone file.

match-clients is what you want. match-clients needs a value of a CIDR network for the private view. match-clients needs a value of "any;" for the public view.

Last edited by SilentRage : July 27th, 2004 at 10:26 AM.

Reply With Quote
  #5  
Old July 27th, 2004, 10:18 AM
cbchev68 cbchev68 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: NH
Posts: 228 cbchev68 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 25 m 38 sec
Reputation Power: 6
Thanks.. That makes sense..

Am I correct in assuming that order is important? Meaning I need to list the private viewfirst.. If I list the 'match-client { any }' (public view) first, that would take precedence?

Reply With Quote
  #6  
Old July 27th, 2004, 10:28 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,193 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 14 h 35 m 27 sec
Reputation Power: 77
good question, but you can make things explicit.

private match-clients example:

match-clients { 192.168/16; };

public match-clients example:

match-clients { !192.168/16; any; };

The IP ruleset (as I call them) definately matters in term of order. The first rule that matches an IP is acted upon, so I had a negating rule before the any rule.

But as for whether view order matters, I don't know, I'd have to look it up. That's why I used match-destinations, cause it was very clear on how it would perform.

Reply With Quote
  #7  
Old July 27th, 2004, 10:35 AM
cbchev68 cbchev68 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: NH
Posts: 228 cbchev68 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 25 m 38 sec
Reputation Power: 6
Cool.. Thanks for the help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > DNS and NAT config question.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway