M
M
MakNait2019-06-03 08:28:29
Domain Name System
MakNait, 2019-06-03 08:28:29

How to redirect dns request from local network to web server?

There is a dns server on windows server 2012 r2.
There is a local portal on another server in the local network with the name "portal.ru" There
is a website on the Internet with the identical name "portal.ru"
could work with it, but if necessary, they could follow the link to the site located on the web server.
The main problem is that the names of the local portal and site are the same and I can't "just take" and redirect....
Is it possible to implement this using Win DNS server? If not, how can this be done?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
G
Gip, 2019-06-03
@MakNait

super perverted solution: watch referrer on portal.ru and redirect to portal.loc if referrer is not portal.loc and ip from your network

A
Armenian Radio, 2019-06-03
@gbg

Eliminate pornography, change the name of the local portal.

A
AUser0, 2019-06-03
@AUser0

It turns out that for users in the local network, portal.ru with a local address and portal.ru with an external address should simultaneously exist . This is simply impossible. Change the local DNS name to e.g. portal.loc. Or use a local IP address instead of portal.ru. Or on the main site, store in cookies which version of the site to show now, but this is already a security hole.

V
Vladimir Skibin, 2019-06-03
@megafax

If both sites should not work simultaneously (which is actually impossible) on the same client, then install a DNS server on all machines, which comes via DHCP to the local machine. Those. users, requesting the portal.ru address, ask the local DNS, which gives them the address to the internal server. Switching - except to quickly reset the DNS cache on the desired machine and disable activity on the local zone.

H
hint000, 2019-06-03
@hint000

Let the internal DNS still issue the internal portal.ru.
The link to the external portal.ru contains a non-standard port, for example portal.ru:11180
Next, using NAT, we redirect from the internal ip-address and port 11180 to the external ip-address and port 80 (or 443). You just need to put this NAT in the right place on the local network.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question