LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 07-03-2012, 12:02 AM   #1
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,203

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 google.com 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
Code:
zone "." {
type master;
file "zones/master";
};
and the NS and A records look like this
Code:
            IN    NS    .
.           IN    A     192.168.1.106 (local ip address for my DNS Server)
google.com  IN    A     131.253.13.32 (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 8.8.8.8.

Last edited by baronobeefdip; 07-03-2012 at 12:06 AM.
 
Old 07-03-2012, 04:19 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6
Posts: 1,602

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
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 google.com in a google.com zone will be decoded as an A record for google.com.google.com due to the way BIND construts FDQNs. Also even setting an A record for google.com does not make it a wildcard for www.google.com etc.
 
  


Reply


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 06:25 PM
Redirect local DNS query to remote DNS server on non standard port? rock_ya_baby Linux - Server 8 04-13-2010 05:31 AM
local dns server with no internet access grcunning Linux - Server 1 10-01-2009 09:32 PM
Local network DNS resolution fails, but DNS resolution to internet is OK farge Linux - Networking 6 05-29-2008 12:49 AM


All times are GMT -5. The time now is 12:35 AM.

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