How to Expose a Local Server to the Internet Without any Additional Tools
How to Expose a Local Server to the Internet Without any Additional Tools

Expose a Local Server to the Internet Without any Additional Tools

Most of the time Developers will have the scenario to access the servers running on local machines externally through the internet.

In this tutorial, let us see how to expose the local server to the Internet without using any additional tools in the windows system.

I am running an Apache Server on a Local machine on port number 8085 and the machine is connected to the internet through a WIFI router(Motorola)

Configure Router

By default the routers restruconfigure the router to allow the internet traffic to the specific internal port(8085).

The Router management UI can be used to define the forwarding rules to forward the traffic from external IP’s to internal IP’s on a specific port.

Open your default router URL, I am using Motorola router access the one of the below IP

(for Motorola modems MB series): 192.168.100.1

(for Motorola modem/router combos): 192.168.0.1 The default username is: admin

The default password is: motorola

Click on Advanced

Advanced Router →Forwarding

Add new Forwarding Rule

Identify the local network IP (ipconfig)

Local

IP Address — Local IP address identified from the previous step

Start Port — 8085(Port in which the Server is running)

End port — 8085

External

IP Address — 0.0.0.0 (Allow from all external IP’s)

Start Port — 80 (the external port used to access the server, configure 443 fro HTTPS)

End Port — 80

Save the configuration

Now the router accepts the traffic from any of the external IP addresses on port 80 and routes internally to the local IP address on port 8085.

Configure Windows Defender Firewall

Windows Defender Firewall helps to secure your Windows device by filtering the network traffic permitted to enter or exit your device.

Let us now configure the Windows Defender Firewall to allow the incoming traffic on port 8085

Open Windows Defender Firewall

Advanced Settings

Define new Inbound Rule with Type Port

Specify the Protocol(TCP) and Specific Local Ports (8085)

Allow the Connection

Enter a name for the rule and save the rule.

Now the Windows Defender Firewall allows the incoming traffic on port 8085

Identify your public network IP — https://www.whatismyip-address.com/?check

The local server on port 8085 is now accessible externally over the internet through your public IP with port number 80 (http://xx.xxx.xxx.xxx). Now you can even create a domain name to point to the public IP so that the servers can be accessed through domain name instead of direct IP.

The router rules and windows Defender Firewall rules can be enabled to support different internal and external ports. This approach will help you to quickly access the local servers externally without enabling any additional tools. Ensure the rules are enabled with care, disable the rules while not in use to avoid exposing the local server to the internet unnecessarily.
['Albin Issac']
['Software Development', 'Networking', 'Technology', 'Windows', 'Programming']