D
D
Doniyor Mamatkulov2018-02-06 19:10:45
Computer networks
Doniyor Mamatkulov, 2018-02-06 19:10:45

Port forwarding web server - mobile phone?

Hello.
There is a TP LINK TL WR840N router. Windows on which the web server Openserver and the site.
How to set up port forwarding on a router so that you can view sites from openserver on a mobile phone (Android) over a local network (WiFi)?5a79d3a27097e387098965.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir, 2018-02-06
@MechanID

Perhaps the problem is that the router has already configured port forwarding from the external IP to the Windows IP where the web server is located, and if the request (by domain name) from the phone comes to the external IP, then it goes through NAT, which stores the IP of the request source and this ip is local and where the webserver is located, seeing that the request came from an address from its subnet, it will answer directly and not through a router, although the phone then sent a request to an external ip and is waiting for a response from a worthless one.
Brief scheme:
192.168.0.1 and 178.248.232.5 - router addresses (internal and external)
192.168.0.2 - webserver
192.168.0.3 - phone
What happens: a packet from 192.168.0.3 goes to 178.248.232.5 goes through NAT and gets to 192.168.0.2
192.168.0.2 seeing that the source of the request from the same network, according to its routing table, responds directly to 192.168.0.3,
but 192.168.0.3 does not wait for packets from 192.168.0.2 and therefore discards it and then waits for a response from 178.248.232.5
as a result, nothing works.
How to fix it:
1 if it is possible to set up static dns inside the router so that the domain address within the network is resolved to the webserver
2 set up hairpin nat, but this can hardly be done on a regular TPlink firmware (for example, on Mikrotik it is not easy to set up)

I
InoMono, 2018-02-07
@InoMono

It's not about port forwarding, it's about name resolution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question