V
V
Vincent12020-11-30 15:50:51
Network administration
Vincent1, 2020-11-30 15:50:51

How does access to a PC from a local network via external ip work?

In the local network, I have an Apache server with a web page. I can go to this web page either by entering the server's local ip 192.168.0.100 or my static external ip (port forwarding is configured properly on the router). And if in the case of access via local ip, it’s clear to me that the traffic does not go further than my network, then how does everything work when I access the page from the local network using an external ip? The router somehow understands that it is not necessary to build a route further than the local network in this case, or does it not understand?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
rPman, 2020-11-30
@rPman

On the router, when you set up port forwarding, you specify whether you need to redirect the port for requests from the local network or not, this is called differently, for example, in kinetic, you can specify in different ways where to redirect requests from which network.
The second way, if you access the site by the name of a site like mysite.com, then you can specify in the settings of your dns server, registered first on local network machines or in the text file /etc/hosts, that this server does not have an external ip address, but an internal local one, then it won't even reach the router.

K
ky0, 2020-11-30
@ky0

how everything works when I go to the page from the local network using external ip

By default, this will not work - and rightly so, no one in their right mind does this. To make the external interface of the piece of hardware available from the local network, configure the so-called. hairpin NAT .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question