Hairpin NAT - 2nd Router

Hi everyone.

I have setup a NAT rule for Hairpin NAT.
Now I had to change from Mikrotik being the only gateway for a second 4G router being the Internet gateway and it stopped working..

It seems that the second router doesnt redirect the requests when they are the public IP but uses them as if it would be the router’s private IP.
I have setup DMZ for the mikrotik’s IP in the 4G router.

Mikrotik: 192.168.0.1
Wan: 192.168.1.1
4G Router: 192.168.1.2
Public IP: xxx.no-ip.org

Example, I try to open http://xxx.no-ip.org:80 inside the mikrotik, and what I get is the 4G router IP.

Is there any sollution for this?

Nobody is going to be able to tell you have to do hairpin NAT on this outside router without knowing the make/model. You might find it easier to do this with DNS rather than hairpin NAT.

Hi.
Well, let’s just say that the other router is not very customizable..
It’s a Huawei B593 and I was trying to use it as a “modem only”.

So I set the DMZ in the b593 for the mikrotik’s IP, and I have the mikrotik taking care of the whole network in a second subnet.
Now, the thing is I don’t know how to configure Hairpin NAT in this scenario.
If it should be configured the same way as if the mikrotik was the only gateway of the network, than I guess it should be a problem of the b593’s config and there’s no sollution possible?

How should I do that with DNS? set a static DNS record?

If it really was “modem only”, then your Mikrotik would have the public IP and you could do the hairpin NAT there. As you’ve described it, the B593 is functioning as just another router.

You can only do hairpin NAT on the device with the outside IP address. Actually, that’s not entirely true. You could set up NAT rules on your Mikrotik that apply where the destination is the public IP address of the B593 and that gets rewritten to the internal server. The problem for you is that if you don’t have a static public IP [as the no-ip.com domain implies] you’ll need to update the rule every time the IP changes. Just use DNS!

Yes, you need to do it on the B593 and no I don’t know how to.

Yes, and make sure your LAN is using your Mikrotik as its DNS server.

Perfect! Thanks.
It is, unfortunately these 4G routers can’t be config as Bridges, and they still offer much more bandwith than a pendrive that I could really use as modem…