LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-26-2005, 08:51 AM   #1
objorkum
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Slackware 10.0
Posts: 231

Rep: Reputation: 30
A question about BIND


I want to use one BIND server to be a DNS server for my internal network and my internet domains.

So for example when an internal client asks for the IP of www.domain.com it gets:

192.168.1.14

But when an internet client asks for the IP of www.domain.co it gets:

217.149.2.4

(Just made some IPs)

How can I do that?

Thanks.
 
Old 06-26-2005, 09:32 AM   #2
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Quote:
But when an internet client asks for the IP of www.domain.co it gets:
If you forgot the m in www.domain.co, skip to C)

These are the dns entries that have to be in your bind zone file.
Code:
www.domain.com.  IN      A       192.168.1.14
www.domain.co.     IN      A       217.149.2.4
Here are the catches:
A) You should set www records to be CNAME's, not A's:
Code:
www.domain.com.  IN      CNAME       server1.domain.com
server1.domain.com.     IN      A       217.149.2.4
B) If an internet client requests www.domain.com, it gets 192.168.1.14
C) Maybe you forgot the m in www.domain.co... I guess that means what you want is to set up different client views. http://www.zytrax.com/books/dns/ch7/view.html
Code:
bind.conf/named.conf:

...
view "trusted" {
 match-clients { 192.168.23.0/24; }; // our network
  recursion yes;
  zone "example.com" {
   type master;
   // private zone file including local hosts
   file "internal/master.example.com";
  };
  // add required zones
 };
view "badguys" {
 match-clients {"any"; }; // all others hosts
 // recursion not supported
 recursion no;
 };
 zone "example.com" {
   type master;
   // public only hosts
   file "external/master.example.com";
  };
  // add required zones
 };
...
 
Old 06-26-2005, 01:43 PM   #3
objorkum
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Slackware 10.0
Posts: 231

Original Poster
Rep: Reputation: 30
Thanks!

Yeah I forgot the m
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind 9 question matthewa Linux - Networking 3 06-23-2005 11:02 AM
bind question gubak Linux - Networking 2 07-27-2004 05:50 AM
Bind question DaHammer Linux - Networking 1 10-16-2003 12:12 AM
Bind 9 Question -- Help chriss Linux - Software 5 07-21-2003 01:12 AM
To 'Bind' or not to 'Bind' that is the question jsurgeson Linux - Newbie 2 03-24-2002 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration