Page 1 of 1

incoming IP address on forwarded port

Posted: 2018/03/07 18:02:43
by logicprobe
When ports are forwarded from a gateway to a server, does the server see only the gateway's IP address, or does it see the IP address of the original, pre-forwarded incoming IP address?

I want the server to see the pre-forwarded IP address instead of the gateway's address for logging purposes, etc. Is that possible?

Re: incoming IP address on forwarded port

Posted: 2018/03/07 18:20:03
by avij
You will see the original IP address.

Re: incoming IP address on forwarded port

Posted: 2018/03/07 19:10:08
by TrevorH
If you're using a port forward on a firewall then you'll see the original ip address. It's when you use a proxy server that you don't but you can get the proxy to add the original ip to the headers it passes.

Re: incoming IP address on forwarded port

Posted: 2018/03/07 19:19:28
by logicprobe
Thanks for the answers. I'm stumbling through setting up a VPS with firewalld doing port forwarding, and some of the details would be a lot harder to figure out without the help I'm receiving here.