LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   DNS view (https://www.linuxquestions.org/questions/linux-server-73/dns-view-798975/)

sang_froid 03-30-2010 04:13 PM

DNS view
 
Hi,

I have two different networks A and B & servers as below

www A 192.168.1.1
A 192.168.2.1

smtp A 192.168.1.1

Whenever a client from A network queries for www, i would like to reply back one of the IPs, say 192.168.1.1 and when a client queries from B, i would like to reply back the other.

I know this can be done by creating views. However, as I have a long list of servers, such as "smtp" which I would like to reply back with same IP ( no matter whether queried from A network or B), I am just wondering if view can be created only for specific hosts (www in this case) and not the entire zone ?

Can this be achieved somehow ???

bathory 03-30-2010 04:47 PM

Hi,

What you can do is to use the same A record for the hosts like smtp in both views:
Code:

view A:
www IN A 192.168.1.1
smtp IN A 192.168.1.1

view B:
www IN A 192.168.2.1
smtp IN A 192.168.1.1

Regards

sang_froid 03-31-2010 08:15 AM

This is what I was thinking if can be avoided. It is because, I use dynamic dns and there will be lots of other hosts such as "smtp" in this case which will have the same IP for both internal and external hosts...

I didn't want to create view for entire zone...I wanted to create only for specific hosts. Is there any other way around to solve this ??



Quote:

Originally Posted by bathory (Post 3918388)
Hi,

What you can do is to use the same A record for the hosts like smtp in both views:
Code:

view A:
www IN A 192.168.1.1
smtp IN A 192.168.1.1

view B:
www IN A 192.168.2.1
smtp IN A 192.168.1.1

Regards



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