How to point a URL to different hosts (in different sites)

Hello, 

I am looking for a solution for a very specific problem. Let me explain:

My organisation owns a website with a lot of links to youtube (educational videos). Students from around the country (in 80 different sites) are visiting this website, all using the same proxy-server.

To take the load of this proxyserver and connection, we want to host copies of this website in every branch office (on a synology NAS) with links to local copies of the movies.

We want it all to be very transparent: there should be 1 URL. If a user visits the URL from outside the organisation he uses the outside copy of the website with the youtube-links, if a user visits the url from within the organisation he should be redirected to the copy of the website which is hosted on the Synology NAS that is found in his own IP-subnet.

Interesting to know: the URL is has nothing to do with our DNS-domain. 

I was thinking in the direction of a CNAME-record in every DNS-subsite, but I don't seem to get anywhere with that. 

Is there somebody who can point me in the right direction?

Thank you!

Pieter

July 28th, 2015 4:30am

Hi Pieter,

If clients would use external DNS when out of organization, I suppose creating a Host record may be the solution for you.

Create a forward lookup zone on internal DNS server and create a Host record.

When clients are in organization, they would query internal DNS server and be redirected to inside website.

When clients are out of organization, they would query external DNS server and connect to the youtube website.

Best Regards,

Leo

Free Windows Admin Tool Kit Click here and download it now
July 28th, 2015 10:08pm

Leo, 

thanks for your quick response. Your solution would be the quick and easy way. 

but...

in every IP-subnet (we have around 80 different subnets) the url should point to another IP-address

in range XX.XX.XX.0 the url 'my.website.com' should be directed to XX.XX.XX.AA
in range YY.YY.YY.0 the url 'my.website.com' should be directed to YY.YY.YY.BB

That means we would have a forward lookup zone with one hostname which can be found on 80 different IP-addresses. And that is the tricky part!

(for external visitors, there is no issue)

July 29th, 2015 6:37am

Hi Pieter,

We could enable Netmask Ordering to solve the problem.

Create different Host records with different IP addresses and enable Netmask ordering. Then the DNS server would give answers according to the querying IP address.

Open DNS management console, right click on DNS server and click Properties. Choose Advances tab and select Enable netmask Ordering.

Hers is the reference for Netmask Ordering:
How netmask ordering feature in DNS affects the resultant queries:
http://blogs.technet.com/b/askpfeplat/archive/2013/02/18/how-netmask-ordering-feature-in-dns-affects-the-resultant-queries.aspx

Best Regards,

Leo

Free Windows Admin Tool Kit Click here and download it now
July 29th, 2015 10:00pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics