LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-12-2009, 12:10 PM   #1
orthogonal3
LQ Newbie
 
Registered: Jun 2009
Location: Manchester, UK
Distribution: CentOS (primarily)
Posts: 6

Rep: Reputation: 5
Question Override real DNS entries with BIND (Centos 5.3)


Hi All,

I'm guessing there has to be a resonable way to solve my issue but I'm trying to get some advice on a best practice to implement.

The situation is this:

I have recently moved to a Web Design company and we need to be able to spoof DNS entries for websites we're working on.

I have an internal BIND DNS server (9.3.4-P1) and currently I have created a zone to spoof entries like this:

For this client say "ABCD" with domain "ABCD.com"
I have created a BIND DNS zone "ABCD.com." with one CNAME alias entry for "www" pointing to our demo server "demo.XYZ.net". The only other entry I think is an NS.

At this point I want to say that this works out fine.
If you browse to "www.ABCD.com" you get the demo website and it works cool.

Now a young SEO consultant likes to try my patience with just entering the domain, less the www. part and it doesn't work as it doesn't match any records. He just gets the current external live site.

I told him to put the www. in and he tells me well it shouldn't make a difference, and that we should have canonical mapping so it still resolves.

Now I'll be honest and I can't figure out how to put in a record into the zone without it being prepended to the domain name.

e.g. "test" would become "test.ABCD.com"

So how do I make a record for just "ABCD.com"???
So "ABCD.com" will go to my demo "ABCD.com" server.

This made me think a bit because, due to the nature of our business this is going to happen a lot, where I'll be asked to turn the spoof on and off many times each day.

So, what is the best way to add/manage these records?

Would I need another instance of BIND? (Not really an issue if I do!)

Can I add a zone from "." so I can spoof anything / any address without blowing up BIND because there is no hints zone file listed?

If I can just add a set of overrides in one file so I can switch them on and off using a web front end I might plug up in PHP?

There will be no restrictions to what domains I'll need to spoof it could be anything for any TLD.

Thanks all for your ongoing wisdom,

Phil
 
Old 08-12-2009, 01:05 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,209
Blog Entries: 1

Rep: Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064Reputation: 2064
You can just add another CNAME to demo.XYZ.net or better use its IP. So either of the following should work:
Quote:
ABCD.com. IN A <demo.XYZ.net-IP>
ABCD.com. CNAME demo.XYZ.net.
 
Old 08-14-2009, 04:42 AM   #3
orthogonal3
LQ Newbie
 
Registered: Jun 2009
Location: Manchester, UK
Distribution: CentOS (primarily)
Posts: 6

Original Poster
Rep: Reputation: 5
Wink Seems to work...

Quote:
Originally Posted by bathory View Post
You can just add another CNAME to demo.XYZ.net or better use its IP. So either of the following should work:
Thanks bathory.

I put an A record in.
Seems to have some decent results, a few oddities though.
I just clear down the squid cache and that tends to make it look good.

It turns out it was Webmin throwing errors in its input checks not the DNS server itself. I like webmin, first use after inheriting it here, but at times its back to the ol' dirty config files.

Cheers
 
  


Reply

Tags
centos5, dns, dnsbind


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
BIND (DNS) Entries Atwin Linux - Server 3 10-25-2008 10:51 PM
Bind: adding DNS entries noir911 Linux - Server 7 10-08-2008 02:31 AM
With bind DNS on localhost, still need to add entries to /etc/hosts? pridefc Linux - Networking 1 04-21-2008 01:24 AM
How to run "Closed" DNS on CentOS using BIND PhilipTodd Linux - Newbie 5 04-10-2006 02:26 AM
How do I make BIND override arbitrary hosts? davidgro Linux - Networking 4 05-13-2005 03:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:58 PM.

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
Open Source Consulting | Domain Registration