I
I
ilya2002020-06-14 11:16:06
Computer networks
ilya200, 2020-06-14 11:16:06

Firewall port forwarding. Why can't I see the client's real ip?

Hello.
1) On the server 192.168.1.2(myhost.local)
firewall-cmd --add-forward-port=port=443:proto=tcp:toport=443:toaddr=192.168.1.3

2) I go from 192.168.1.100 to https: //myhost.local/

3)On the server 192.168.1.3, nginx is up and in its access.log
192.168.1.2 - - [14/Jun/2020:13:03:27 +0500] "GET /favicon.ico HTTP/1.1 " 404 209 " https://myhost.local/ " " Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 YaBrowser/20.6.0.905 Yowser/2.5 Yptp/ 1.23 Safari/537.36"

why is the client's real ip 192.168.1.100 not visible in the access.log? What are the solutions to get a real ip?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hint000, 2020-06-14
@hint000

If there was an address of a real client, then nginx would send the response to the real client.
Situation: 192.168.1.100 sends a request to 192.168.1.2, and receives a response from 192.168.1.3, from which it does not expect anything. The client does not know what to do with an unexpected response from no one knows who , and throws the response into the trash. In the end, nothing works. So that this does not happen, it works as you observe. Proxy type.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question