Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...The forum looks great! You guys have done a fantastic job on arranging things there...Your site is very precise and fun to visit..."

Geography

Where in the world do Tek-Tips members come from?

one domain different address depending on sourceHelpful Member! 

ldzib (IS/IT--Management)
14 Mar 12 14:56
in Local Network i have one server named test.domain.com with three ip address:

192.168.1.1
172.16.1.1
10.9.1.1

I want to:
When clients in subnet 192.168.1.x ask for DNS test.domain.com get ip address 192.168.1.1
When clients in subnet 172.16.1.1 ask for DNS test.domain.com get ip address 172.16.1.1
When clients in subnet 10.9.1.1 ask for DNS test.domain.com get ip address 10.9.1.1

This will communicate clients directly with server, no need to route packets from one subnet to other subnet through Firewall.

Any tips? thanks.
Noway2 (Programmer)
15 Mar 12 13:19
This could be a little bit tricky.
One way would be to run three copies of your DNS application, each listening on a different interface associated with the subnet.  This does lead to the question I have of is your DNS on a common (e.g. public) interface that all three ranges can access?

A second way, to investigate at least as I am not sure if it would work, would be to use ACLs to enable the respective zone file when connecting from a particular range.
  
ldzib (IS/IT--Management)
20 Mar 12 15:37
Hi Noway2, yes my DNS server is common to all my networks:
DNS server has only one interface:
192.168.20.1

webserver test.domain.com has three interfaces:

192.168.1.1
172.16.1.1
10.9.1.1

clients in 192.168.1.x has DNS server 192.168.20.1
clients in 172.16.1.x has DNS server 192.168.20.1
clients in 10.9.1.x has DNS server 192.168.20.1

when clients 10.9.1.x ask ip address for test.domain.com they should get 10.9.1.1

when clients 172.16.1.x ask ip address for test.domain.com they should get 172.16.1.1

when clients 192.168.1.x ask ip address for test.domain.com they should get 192.168.1.1


i'll read ACL documentation, it's hard to add two new interfaces to my DNS server.

 
SweetRevelation (TechnicalUser)
22 Mar 12 16:37
ACLs with a view clause should be what you need in BIND.  You can create a view to offer up a different file for the zone requested, and you can assign people to the view with the ACLs.
Helpful Member!  ldzib (IS/IT--Management)
8 Apr 12 17:52
thanks SweetRevelation i've solved it:

#cat /etc/named.con
acl "subnet_one"{
192.168.1.0/24;
};

acl "subnet_two"{
172.16.1.0/24;
};

acl "subnet_three"{
10.9.1.0/24;
};

options{
bla...bla...
};

view "one_view"{
match-clients { subnet_one; };
zone "mydomain.com" IN {
        type master;
        file "subnet_one/mydomain.com";
};
};

view "other_view"{
match-clients { subnet_two; };
zone "mydomain.com" IN {
        type master;
        file "subnet_two/mydomain.com";
};
};

view "third_view"{
match-clients { subnet_three; };
zone "mydomain.com" IN {
        type master;
        file "subnet_three/mydomain.com";
};
};

Interesting part of mydomain.com:

#cat /var/named/subnet_one/mydomain.com

test    IN    A    192.168.1.1


#cat /var/named/subnet_two/mydomain.com

test    IN    A    172.16.1.1

#cat /var/named/subnet_three/mydomain.com

test    IN    A    10.9.1.1


when clients in subnet one ask for test.mydomain.com they get 192.168.1.1
when clients in subnet two ask for test.mydomain.com they get 172.16.1.1
when clients in subnet three ask for test.mydomain.com they get 10.9.1.1

thanks.
ShackDaddy (MIS)
9 Apr 12 10:58
Nice job. Thanks for posting this.

Dave Shackelford
ThirdTier.net
TrainSignal.com

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close