How to redirect dns request from the LAN to the web server?

A dns server on windows server 2012 r2.
A local portal on the other server in local network with name ""
There is a web site on the Internet with the same name ""
You want to make sure that local users when you navigate to the site "" got on a local portal and was able to work with him, but if necessary could go to the website located on the web server.
The main problem is that the names of the local portal and website are the same and I can't "just take" and redirect....
To implement it means Win DNS server? If not by what means it can be implemented?
March 23rd 20 at 18:50
5 answers
March 23rd 20 at 18:52
super perverted decision: watch the referrer and redirect to portal.loc, if the referrer is not portal.loc and ip from your network(and on the portal.loc link Parati on
This sodomy can be arranged through htaccess on local and web server?
Indulge with a view on the DNS server. While the ideas of the current banner in the center of the site with the choice of where to go... - easter.Schulist commented on March 23rd 20 at 18:55
March 23rd 20 at 18:54
Eliminate pornography, change the name of the local portal.
The fact of the matter is that you can't fix. The customer's wishes to nick from the local area while trying to go to the website of the organization was buried in a local information portal... - easter.Schulist commented on March 23rd 20 at 18:57
So this wishlist is not the same superiors. - Bernadette.Volkman commented on March 23rd 20 at 19:00
@Bernadette.Volkman, how? Transfer the site to a local hosting are excluded. In local network there is a domain with AD from ancient times his name all of a sudden! - - easter.Schulist commented on March 23rd 20 at 19:03
March 23rd 20 at 18:56
Turns out to users in the local network must SIMULTANEOUSLY exist to a local address and with the external address.
This is simply impossible.

Change local DNS name for example on the portal.loc.
Or use the local IP address instead
Or on the main website store in a cookie, which version of the website now to show, but this is a security hole.
March 23rd 20 at 18:58
If both should not work (which is actually impossible) both sites on the same client install on all the machines in DNS server that comes on the DHCP local machine. Ie users requesting the address - ask the local DNS, which gives them the address to the internal server. Switch - except to quickly reset the DNS cache in the right machines on and off activity in the local area.
March 23rd 20 at 19:00
Internal DNS may still issues internal
Link to external contains a non-standard port, for example portal.EN:11180
Then the NATs will re-address with the internal ip address and port 11180 to the external ip address and port 80 (or 443). Only need to put this NAT in the right place at the LAN.

Find more questions by tags Network administrationWindowsDomain name system