S
S
Sergey Semenko2021-02-10 15:27:14
Network administration
Sergey Semenko, 2021-02-10 15:27:14

How to store the IP address of the client in the local network when requested through the external interface?

There is an HTTP server on the local network with the address 192.168.1.100, redirection from outside on the 443rd port is configured on it.

The client with the address 192.168.1.200, being in the same local network with this server, makes a request through the external interface (via the domain bound to the external IP), the HTTP server accepts this request, but instead of the client IP it receives the gateway IP (192.168.1.1), which is generally logical, but I would like to get the address 192.168.1.200 on the HTTP server as a result.

As I understand it, this can be done only if you send a request to the HTTP server, bypassing the external interface.

Question: how to do this without an internal DNS server? Theoretically, after all, the router itself can solve this issue?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry, 2021-02-11
@dtmse

Separate the server and client on different internal subnets. In this case, there will be no need to replace the internal address of the client with the external address of the router (since there will be no situation when traffic from the client to the server and back goes along different routes).

K
ky0, 2021-02-10
@ky0

The client with the address 192.168.1.200, being in the same local network as this server, makes a request through the external interface

This is a crook - clients from the local network should not go to local resources at an external address.
In general, special headers a la X-Real-IP are used to forward an IP address behind NAT .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question