Page 1 of 1

Access to local web server by its dns name

Posted: Thu Nov 20, 2014 1:22 am
by freeman7162
I have web server on static IP 192.168.0.2. I made access to it by http://site.com from internet via NAT rule. But in Local network i need to type http://192.168.0.2 instead of http://site.com. Please help me fix it. I want to type http://site.com and get access in local network too.

p.s. i have read http://wiki.mikrotik.com/wiki/Manual:IP ... NS_Entries but dont clearly undestand(

Re: Access to local web server by its dns name

Posted: Sat Nov 22, 2014 3:28 am
by error216216
Well you can try to add a DNS rule in the router's DNS Static rules with:
/ip dns static add address=192.168.0.2 name=www.example.com
This way if your computer has the router's IP in the DNS section of your computer's network configuration, and nothing else, when you will type http://www.example.com from LAN the DNS resolv will come directly from the router as 192.168.0.2.

Re: Access to local web server by its dns name

Posted: Sat Nov 22, 2014 4:31 am
by Rudios
Search for hairpin nat. That will solve your problem.