Let's start, I have some servers behing a Mikrotik RB 150, I've fordwarded the ports like everybody does with a NAT rule and it works great.
Code: Select all
;;;; Server
chain=dstnat action=dst-nat to-addresses=192.168.x.x to-ports=80 dst-address=xxx.xxx
.xxx.xxx dst-port=80 protocol=tcp
(the x is just to not show the IP)
But the problem is around the logs in the server. As it's a NAT, all the external IPs (public IPs) from internet are changed to Gateway's IP of the internal network. So then, all the logs have as IP 192.168.x.x (private) instead of the real external public IP of the visitor.
I have no idea how to solve this. I mean, that my
Apache server log the public IPs instead of the private one.
Any clue? Did anybody had this problem?
Thanks and hope I've been clear with the problem.