Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-02-2012, 11:02 PM   #1
Senior Member
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
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

Last edited by baronobeefdip; 07-02-2012 at 11:06 PM.
Old 07-03-2012, 03:19 AM   #2
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,450

Rep: Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind9 DNS Server : requests timed-out theclem35 Linux - Server 4 02-12-2012 05:25 PM
Redirect local DNS query to remote DNS server on non standard port? rock_ya_baby Linux - Server 8 04-13-2010 04:31 AM
local dns server with no internet access grcunning Linux - Server 1 10-01-2009 08:32 PM
Local network DNS resolution fails, but DNS resolution to internet is OK farge Linux - Networking 6 05-28-2008 11:49 PM > Forums > Linux Forums > Linux - Server

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration