Community discussions

MikroTik App
 
dhanushka
just joined
Topic Author
Posts: 3
Joined: Fri May 13, 2022 8:59 am

Cannot access server with public ip/domain within the same network

Mon May 16, 2022 5:23 am

Hi guys,

I'm very new to networking (Software engineering background) and learning how to do basic networking.

So we have this local server with a static (public) IP.

I've forwarded ports in the Mikrotik router, so we can access it via the public ip / domain name from external networks. (works perfectly)

But when I'm on the same network, I cannot access it via the domain name or the public ip (only private ip works)

Is there a way to make the domain name / public ip work within our local network as well?

Thanks in advance.
port-80.png
You do not have the required permissions to view the files attached to this post.
 
Sarel0092
newbie
Posts: 48
Joined: Tue Aug 07, 2018 8:25 am

Re: Cannot access server with public ip/domain within the same network

Mon May 16, 2022 7:50 am

If the router is your DNS server or if you have a DNS server in your network and you have access to it add a A record for the hostname/domain name that points to the internal IP address of the server.

Alternatively you can try to add another port forwarding rule and set the In.Interface to your bridge interface or local LAN. (You should be able to leave In.Interface blank as well.)
 
erlinden
Forum Guru
Forum Guru
Posts: 2492
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Cannot access server with public ip/domain within the same network

Mon May 16, 2022 8:06 am

Though I like the approach of Sarel0092, there is another option: Hairpin NAT:
viewtopic.php?p=879493
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21351
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Cannot access server with public ip/domain within the same network

Mon May 16, 2022 5:47 pm

This was written JUST FOR YOU!!!
viewtopic.php?t=179343

Who is online

Users browsing this forum: No registered users and 4 guests