Community discussions

MikroTik App
 
flaviopp92
just joined
Topic Author
Posts: 1
Joined: Tue May 28, 2019 4:09 pm

Redirect from local IP using public IP to local IP

Tue May 28, 2019 6:20 pm

Hello guys!
First sorry my bad english, I'm from Brazil and I don't speak english well.
I have a public IP that I use to access my internal network, forwarding ports by NAT rules.
When I use this public IP from external network to access my website, that is hosted in one of my servers, I do this well, but when I try to access this same public IP address from my network, it fails.
DNS is not an alternative, because my port forward deppends on each port I try access.
If I use my public IP ex: 111.111.111.111:80 the Mikrotik NAT forwards to 192.168.0.1:80
If I use my public IP ex: 111.111.111.111:14253 the Mikrotik NAT forwards to 192.168.0.2:8080

I don't know what to do, because e need to access my website from my local network and it does not work, only if I try out of my local network.

Thank's so much!
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11155
Joined: Mon Dec 04, 2017 9:19 pm

Re: Redirect from local IP using public IP to local IP

Sat Jun 01, 2019 10:06 am

Look here for explanation and solution.
 
rbnewfan
newbie
Posts: 28
Joined: Sat Oct 22, 2016 5:23 pm

Re: Redirect from local IP using public IP to local IP

Sat Jun 01, 2019 11:34 pm

And why DNS is not an option, port forwarding has nothing to do with that. You use domain names instead of IPs. Also if you use Host-based multiple-websites behind one server, you will have to use domains. Well, if hosting just one default website, that is not an issue though.
But what you are asking for is called hairpin NAT and it's easy to set by a NAT rule and eventually some small changes in the actual dst-NAT rules.

Who is online

Users browsing this forum: gianry, yonutm and 31 guests