Configuring a network firewall
Most networks are protected by a firewall that prevents users on the Internet to access services running on machines
inside your network. Consider the following image as an example.
Following assumptions are made in this example:
- A web server is running on
192.168.1.5
inside your LAN, which is listening on port 80 and 443.
- A user, VisitorA, on the Internet needs to access this web server or port 443 (HTTPS).
- A network firewall/router prevents anyone on the Internet to access machines running inside your LAN. This means VisitorA,
will not be allowed to access the web server running on your LAN by default.
- You will have to configure your router/firewall so traffic for port 80 and 443 gets forwarded to
192.168.1.5
, which
is the machine where your web server is running.
Configuring Your Router
Most routers have a built-in firewall. Therefore, you need to connect to the router's web interface in order to configure the firewall. Unfortunately,
there are many different brands for these routers, each with a different interface. Therefore, it is impossible to discuss the exact steps for every router.
Instead, this article discusses a pattern that most routers follow. It talks about what to look for in your router's web interface in order to configure
the firewall.
Connecting to Your Router's Web Interface
Most routers are accessible through a web browser. To connect type one of the following addresses in the address bar of your browser:
192.168.1.1
192.168.1.0
10.0.1.1
10.0.0.1
You should see a login page if you're able to successfully connect to the router's web interface.
Use the following method if all of the above addresses fail to connect.
- Open a Command Prompt by typing
command
at the windows Search bar (bottom left).
Click here for an image.
- Type
ipconfig
. You will see a similar window as shown below.
- The IP address you see for Default Gateway is usually your router.
Configuring the Firewall in your Router
Although most routers have vastly different interfaces, luckily only a handful of terms are used to describe this setting. Look for any of these values:
- Port Forwarding/Port Triggering
- Application & Gaming
- Firewall settings
most of them refer to this setting as
Port Forwarding/Port Triggering. If you cannot find this, try
searching for
Firewall settings.
The goal is to specify a port number and the corresponding IP address where your web server is running. This essentially means that any traffic from the Internet
on the specified port should be routed to the machine where your web server is running.
The image below is an example of a screenshot taken from a Netgear Nighthawk router.
In the above example, the service name
HTTP refers to port 80. In some routers, you will have to explicitly specify a port number, such as 80 or 443.