Solved

Redirect Website using DNS

Posted on 2014-09-18
10
213 Views
Last Modified: 2014-09-29
Hey guys,

We need to redirect a public website (say for ex. yahoo.com) to a different website. I tried doing this via CNAME record in my 2008 DNS server but it didnt seem to work right. Any help?
0
Comment
Question by:Cobra25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
10 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 40332119
DNS can't redirect (change the name typed into the address bar in a browser), you need a web server to do that.

Do you have a web server you can bounce the request through?

Chris
0
 
LVL 22

Expert Comment

by:dan_blagut
ID: 40332243
Hello

You can't do that in that way. The Cname can be used as an alias for a web site (ex you type yaho and your browser go to www.yahoo.com)

If you want to filter things you need a proxy server, like ISA server.

Dan
0
 
LVL 30

Accepted Solution

by:
Rich Weissler earned 500 total points
ID: 40332310
What you describe is used to "Sinkhole" domains.  Basically, you'd treat yahoo.com as a hostile domain... and configure your local DNS server to tell it's client that it's authoritative for that domain.  You'll want to read more about Sinkhole DNS and DNS Blackholes.  

For the purpose you define, a good proxy server is a better idea.  Unfortunately ISA Server became Forefront Threat Management Server, and the Forefront Threat Management Server is a discontinued product.  One possible (and free) web proxy I've used in the past with some success has been Squid, if you decide to go down the proxy direction.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 40

Expert Comment

by:noci
ID: 40334248
with a CNAME (or alternate A RR) you can impersonate a site. The server needs to understand the hostname sent to it as the name that is typed by the user...
so if you want to handle yahoo.com then with something like
                yahoo.com CNAME yourserver.com

then yourserver needs to be able to handle yahoo.com (as yahoo.com is mentioned in the http request).
To capture the information in transit you need to setup a transparant proxy (so the browser doesn't (need to) know there is a proxy)
squid can help, but needs something that will redirect traffic through it.
0
 
LVL 24

Expert Comment

by:Dirk Kotte
ID: 40335543
if the alternate DNS record don't work, check if you use a proxy ... because then the proxy resolves the ip to the name and often the proxy points to external dns-servers ...
0
 
LVL 4

Author Comment

by:Cobra25
ID: 40335972
thanks guys! in the HOSTS file can i redirect a website to a local file path on my pc?

say localhost\server\testwebpage.html
0
 
LVL 22

Expert Comment

by:dan_blagut
ID: 40335991
The host file can be loaded before all DNS research. So you can say:
www.yahoo.com 10.0.0.1
where 10.0.0.1 is the IP adresse of your internet server.

But this file can be edited by all admin users, unles a GPO rewrite the correct version on each reboot.

Dan
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 40336049
The hosts file doesn't redirect either, it does what DNS does: points a name at an IP address.

The server on the other side must be willing to answer the request for whatever name you originally use.

If that's what you intend then it'd be best going back to your question, what about it didn't work right?

Chris
0
 
LVL 40

Expert Comment

by:noci
ID: 40336071
your webserver also needs to be configured to accept any name or your example of yahoo.com
In case to your own pc use the address 127.0.0.1
0
 
LVL 24

Expert Comment

by:Dirk Kotte
ID: 40336073
> thanks guys! in the HOSTS file can i redirect a website to a local file path on my pc?
> say localhost\server\testwebpage.html

NO, this is not so simple.
While you call http://externalservername/file.html for the a file at a webserver your local filesystem dont answer to http:// . a Redirect to file://localhost/file.html is not possible from the hostfile.

You Need a local webserver, and a local dns overwrite (via Hosts-file) to Redirect the request to your local ressource.
But if your browser uses a Proxy, the local name-Resolution is not used.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DNS forwarder or DNS forwarder records missing. 1 43
Windows Modify Permissions 19 85
T-SQL: Need training video on creating a Clustered Index 2 49
Copy user profile 6 30
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question