LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-15-2008, 10:43 AM   #1
johnewing
Member
 
Registered: Jul 2003
Location: Scotland
Posts: 34

Rep: Reputation: 16
Question dns configuration question.


Hi

I wondering if is possible to configure my local dns server to forward all traffic for a certain dns prefix to one ip address.

e.g. all traffic for xyz.* goes to 192.168.0.4

so xyz.example.com
and xyz.anything.com
would point to 192.168.0.4

The reason I would want to do this is my company has a lot of urls and i would like users to be able to switch between the remote live server and local test server by changing prefix.

e.g.

www.example.com points to live but
xyz.example.com points to test.

Adding the test urls manually would be really time consuming and the list grows constantly.


Is it possible ?

Thanks

J.
 
Old 10-15-2008, 10:58 AM   #2
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
John,

Since you're going to have to have individual zone files for each domain, I can't see how you would gain from this strategy. There's no overall zone file for all domains. If there were, then your server would have to be authoritative for every domain!

You will need to use something like

xyz IN A 192.168.0.4
www IN A 1.2.3.4

for each zone file.
 
Old 10-15-2008, 11:44 AM   #3
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
Yes you can. Look at Apache Virtual Hosting.
 
Old 10-16-2008, 03:21 AM   #4
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
Sorry Aurora, but I think that's wrong.

Apache virtual hosting will let you have multiple hosts pointed to the same IP and will serve different websites according to the hostname specified in the http request.

e.g.:
In example.com zone file:
www.example.com IN A 192.168.0.4
xyz.example.com IN A 192.168.0.4

In anything.com zone file:
www.anything.com IN A 192.168.0.4
xyz.anything.com IN A 192.168.0.4

Virtual hosting will allow you to server between 1 and 4 different sites for each of these hostnames. However you still need to have different zone files for each domain.

AS such, it doesn't answer John's question as to whether it's possible to have a single zone file where www.* and xyz.* (using * as a wildcard here) will work. The answer is that it won't. There's no such thing as a universal zone file.

Carl.
 
  


Reply



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
DNS configuration and configuration file in RHEL5 remo1225 Linux - Newbie 1 02-20-2008 04:25 AM
DNS configuration tsaravan Linux - Newbie 1 11-10-2007 10:59 PM
dns configuration question zugi99 Linux - Newbie 4 03-20-2006 10:12 PM
DNS configuration? existo Slackware 1 01-30-2004 12:43 PM
DNS Configuration romel Linux - Newbie 4 09-22-2003 09:45 AM

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

All times are GMT -5. The time now is 10:22 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
Open Source Consulting | Domain Registration