DNS for internal end external
Hi,
How do i configure bind so that when a request comes from our LAN, address should be resolved to local address and when the request is from outside it should resolve it to a public address.
I am using Red Hat Linux 7.2
Thanks and Regards
Murali
Hi,
This problem is to your clients, they've configurate the search domain...
bind can have a internal domain to resolve your LAN IPs address.
El mi? 02-07-2003 a las 02:32, Murali Potla escribió:
Quoted 11 lines
Hi,
How do i configure bind so that when a request comes from our LAN, address should be resolved to local address and when the request is from outside it should resolve it to a public address.
I am using Red Hat Linux 7.2
Thanks and Regards
Murali
--
Daniel Eugenin M.
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Murali Potla
Hi,
How do i configure bind so that when a request comes from our LAN, address should be resolved to local address and when the request is from outside it should resolve it to a public address.
We do this in Bind 9 using "views"
In the below example the "LAN" are clients that belong to 192.168.0/24 and the "outside" is everything else.
example:
view "internal" {
match-clients { 192.168.0/24; };
recursion yes;
zone "domain.com" {
type master;
file "domain.com-internal";
};};
view "external" {
match-clients { 0.0.0.0/0; };
recursion yes;
zone "domain.com" {
type master;
file "domain.com-external";
};
};HTH
Quoted 34 lines · Jessie Bryan
Quoted 6 lines · Murali Potla
Hi,
How do i configure bind so that when a request comes from our LAN, address should be resolved to local address and when the request is from outside it should resolve it to a public address.
We do this in Bind 9 using "views"
In the below example the "LAN" are clients that belong to 192.168.0/24 and the "outside" is everything else.example:
view "internal" { match-clients { 192.168.0/24; }; recursion yes; zone "domain.com" { type master; file "domain.com-internal"; };};
view "external" { match-clients { 0.0.0.0/0; }; recursion yes; zone "domain.com" { type master; file "domain.com-external"; }; };
Quoted 2 lines
HTH
This is ok.
How can i use the same zone file for both internal and external clients ? Because here i need to maintain two files.
lets say for a domain.com i will have a zone file which will have both internal and external addresses. But when a query comes for abc.domain.com, it should be resolved to 192.168.1.10 if the request is from 192.168.1.5 and when a query comes for abc.domain.com from a public IP it should be resolved to the publicly addressable IP of abc.domain.com (lets say 100.100.110.101). Is this setup possible with bind ?
Thanks
Murali
Quoted 7 lines · Murali Potla
Hi,
How do i configure bind so that when a request comes from our LAN, address should be resolved to local address and when the request is from
outside it should resolve it to a public address.
You will need two DNS servers: one listening on the LAN, and one on the Internet, simple solution. BIND 9 offers other configurations allowing you to listen on multiple interfaces handling each differently.
Quoted 1 line
I am using Red Hat Linux 7.2
That's good to know, but your question was about BIND.
Here is some very useful reading
http://tldp.org/HOWTO/DNS-HOWTO.html
Quoted 11 lines
Thanks and Regards
Murali-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Scott
long .signature files are annoying
on "7-2-2003" "Murali Potla" writ:
: How do i configure bind so that when a request comes from our LAN, : address should be resolved to local address and when the request is from : outside it should resolve it to a public address.
... how about using 'etc/hosts' ...
Signature · 2 lines
... i'm a man, but i can change,
if i have to , i guess ...It looks like the views would do what's wanted, but you will have to have two files... one for internal one for external.
If what you want to do is avoid having two files for machines which have the same address for both external and internal, then you can actually have three files:
One file is for unique internal addresses
one file is for unique external addresses
One file is for machines which have the same address {ex,in}ternally.
The third file would be included from inside each of the first two.
If what you actually want is to have one file with addresses for both internal and external, then you'll have to put together a filter...
For this, I'm thinking of something like:
# hostname internal external
www A 192.168.45.11 37.45.222.11
ftp A 192.168.45.51 37.45.222.51
mail MX`1 intmail extmail
mail MX 3 . remote.mx.com.
intservice A 192.168.45.51 /
A quick perl or aqk script would do a good job of Tturning this into two separate files. (left as an exercise for the reader... or you can pay me to do it..:-)
intonly.me.com 192.168.53.31 .
A quick awk or perl script would go from this to a real zone file.
Quoted 7 lines · Murali Potla
On Wed, 2003-07-02 at 13:56, Jessie Bryan wrote:
This is ok.
How can i use the same zone file for both internal and external clients ? Because here i need to maintain two files.lets say for a domain.com i will have a zone file which will have both internal and external addresses. But when a query comes for abc.domain.com, it should be resolved to 192.168.1.10
if the request is from 192.168.1.5 and when a query comes for abc.domain.com from a public IP it should be resolved to the publicly addressable IP of abc.domain.com (lets say 100.100.110.101). Is this setup possible with bind ?
Signature · 4 lines
Stephen Samuel +1(604)876-0426 [email protected] http://www.bcgreen.com/~samuel/ Powerful committed communication. Transformation touching the jewel within each person and bring it to life.