[afnog] DNS Case

Mbong Ekwoge/Engineering MSO/Kampala Mbong.Ekwoge at waridtel.co.ug
Fri Jan 30 14:01:50 UTC 2009


Thanks Guys. 

-----Original Message-----
From: SM [mailto:sm at resistor.net] 
Sent: Friday, January 30, 2009 4:59 PM
To: Mbong Ekwoge/Engineering MSO/Kampala
Cc: afnog at afnog.org
Subject: Re: [afnog] DNS Case

Hi Hudson,
At 04:13 30-01-2009, Mbong Ekwoge/Engineering MSO/Kampala wrote:
>How do I configure Red Hat Linux to advertise two different IP
addresses
>for a single host? Take for example the host is assigned a private IP
>address and then translated into a public IP.

Rephrasing your question, DNS clients sending a query from the LAN 
get the private IP address while DNS clients from the Internet get 
the public IP address.  This is referred to as split DNS and it can 
be done with views.

view "internal" {
  match-clients { 192.168.0.0/24; };
   recursion yes;
   zone "example.com" {
    type master;
    file "internal/master.example.com";
   };
  };

view "external" {
  match-clients {"any"; };
  recursion no;
  };
  zone "example.com" {
    type master;
    file "external/master.example.com";
   };
};

There are two zone files, one for the internal view and the other one 
for the external view.  You can have different DNS records in these
zones:

Internal:

www.example.com.   A   192.168.0.2

External:

www.example.com.   A   192.0.2.2

Regards,
-sm 






More information about the afnog mailing list