N
N
No_name4512021-07-09 17:12:16
local server
No_name451, 2021-07-09 17:12:16

How to forward ports on the local network?

Hello.

Scheme:
1. Orange Pi One Plus is connected to the router via ethernet. It runs a django application on port 8000 (accessible via 127.0.0.1:8000/localhost:8000). Let's call this connection S1.
2. n number of PCs are connected to the router, using a network card. Let's call this connection S2.

Task:
It is necessary to make it so that when accessing, for example, localhost:8000 from a PC, requests are proxied to Orange Pi One Plus, to its port 8000.
That is, Local network: S2(localhost:8000)<--router-->S1(localhost:8000)

How is it possible to implement this task? I see no reason to use Ngrok, since the session lasts about 2 hours, and there is no way to buy it.

OS Orange Pi One Plus: Armbian Focal
PC OS: Windows
Router: TP Link WR841N Thanks

in advance for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Constantine, 2021-07-09
@psycho-coder

Not in the current assignment. localhost or 127.0.0.1 is the local address of the computer and does not go outside the machine.
You need to specify the address of the router with the port, and on it forward the port to the Orange Pi. At the same time, on the Orange Pi itself, the web server should listen not to the localhost, but to either all interfaces or its own ip
Local network: S2(router-ip:8000) router -> S1(OrangePi:8000)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question