Home > OS >  Serve to internet from a subnet
Serve to internet from a subnet

Time:11-06

I have a wifi router, to which multiple devices are connected. Now let's say one of these devices is my laptop, in which I am running an apache server.

The server is accessible from every node inside the subnet that the wifi router creates, but it isn't accessible from outside the subnet.

I found the IP address of the router, and from another device that was not on the same network as the server, but it didn't go through.

The reason I understood for this was:

The router understands to which device a response goes to due to it's internal tables. But once I create a server inside the subnet, then from the perspective of an outer node, the router appears as a single node, and they don't know to whom request the page.

So I wanted to know is there a way to serve to the internet from within the subnet.

Any pointers appreciated.

CodePudding user response:

What you are refering to is port forwarding. You need to tell your router that trafic reaching for port 81 (for example) is destined to IP address x.x.x.x on the local network, on port Y. Most routers can do this in their GUI or command line interface.

  • Related