My current setup includes a pfSense firewall which port forwards public WAN traffic to a NAT internal IP.
Example:
- 104.12.134.12:80 (WAN IP) port forwards all traffic to 192.168.1.104:80
This is working as expected, traffic is forwarded on correctly. The issue I'm having is I see the local IP (i.e. pfSense router IP, in this case, 192.168.1.1) within Nginx logs.
I've searched and lots of articles suggest using real_ip module, and setting X-Forwarded-For header, but this doesn't work.
Notes:
- The IP of my router differs from the IPs I'm port forwarding (this is intentional).
- I don't own 104.12.134.12, this is just an example.