[afnog] DNS Case

SM sm at resistor.net
Fri Jan 30 13:59:28 UTC 2009


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