Community discussions

MikroTik App
 
freeman7162
just joined
Topic Author
Posts: 6
Joined: Thu Nov 20, 2014 1:14 am

Access to local web server by its dns name

Thu Nov 20, 2014 1:22 am

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(
 
error216216
newbie
Posts: 25
Joined: Fri May 23, 2014 2:07 am

Re: Access to local web server by its dns name

Sat Nov 22, 2014 3:28 am

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.
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Access to local web server by its dns name

Sat Nov 22, 2014 4:31 am

Search for hairpin nat. That will solve your problem.

Who is online

Users browsing this forum: broderick, miker3000, unhuzpt, zalciukaz and 115 guests