-   Linux - Server (
-   -   can a local DNS Server be used to handle dns requests going out to the internet (

baronobeefdip 07-02-2012 11:02 PM

can a local DNS Server be used to handle dns requests going out to the internet
I am running an experiment to see if i can make my own DNS server request IP address from the internet but instead i want to mic up the addresses a little just as an experiment. What I want to do is make my local DNS server handle the requests that are going out on the internet for instance. I want to put an A record in the zone file to respond to a request for and instead of giving google to the client i want it to give it a different web site (like bing or yahoo)

what i have so far is that i made the zone statement in the named.conf look like this

zone "." {
type master;
file "zones/master";

and the NS and A records look like this

            IN    NS    .
.          IN    A (local ip address for my DNS Server)  IN    A (the ip address for bing)

when it starts to browse the connection fails even though the A record has an ip address to go to so what is the problem here, even if i try to go to facebook which doesn't have an A record and it still fails. when an A record is unavailable how do i make it move on to the google public dns server which is

TenTenths 07-03-2012 03:19 AM

Look up the many, many, many "how-to" documents for setting up a "cache dns server" based on your distribution of linux and choice of name server.

Then, to over-ride lookups you will need to create and load zone files for the domains you wish to over-ride. You would most likely want to structure this zone with the "real" NS records for the domain you're messing with and then over-ride the entries you want to fake.

Note that in BIND, an A record that starts in a zone will be decoded as an A record for due to the way BIND construts FDQNs. Also even setting an A record for does not make it a wildcard for etc.

All times are GMT -5. The time now is 11:18 AM.