Community discussions

just joined
Topic Author
Posts: 1
Joined: Fri Nov 09, 2018 10:06 pm

Hairpin NAT, but change the src IP to my WAN's instead of my router's

Sat Nov 10, 2018 8:46 pm

Hello, I'm trying to configure Hairpin NAT like that:
/ip firewall nat add chain=dstnat dst-address-type=local protocol=tcp dst-port=443 action=dst-nat to-address= to-port=443
/ip firewall nat add chain=srcnat src-address= dst-address= protocol=tcp dst-port=443 out-interface=bridge action=masquerade
... and it works. is the IP address of my RaspberryPi and the port 443 is pointing to my Apache server running there.
However, when I look into the Apache's logs, the source IP of the request is always, which is the IP of the Mikrotik router.

Is there any way how to change the router IP in the request ( to my WAN IP (213.x.x.x) in this case, so it would show in the logs?

The reason why I'm asking is that my old router did that automatically and I was used to it.

Who is online

Users browsing this forum: No registered users and 36 guests