Application example: Make a local web server public

If you host a web server on your local network, you can use port forwarding to allow web requests from anyone on the Internet to reach your web server.

To make a local web server public:

  1. Assign your web server a fixed IP address using static IP reservation (see MAC address to IP address bindings).
    In this example, your security gateway always gives your web server an IP address of 192.168.1.33.
  2. Add a port forwarding rule that lets the security gateway forward the HTTP service to the local address of your web server at 192.168.1.33.
    HTTP (port 80) is the standard protocol for web servers.
  3. When an external user types the URL www.example.com in their browser, the browser sends a web page request message with the following destination information:
    • Destination address: The IP address of www.example.com, which is the address of your security gateway.
    • Destination port number: 80, which is the standard port number for a web server process.
  4. Your security gateway receives the message and finds the port forwarding rule for incoming port 80 traffic.
  5. The security gateway changes the destination in the message to IP address 192.168.1.33 and sends the message to the web server.
  6. Your web server at IP address 192.168.1.33 receives the request and sends a reply message to your security gateway.
  7. Your security gateway performs Network Address Translation (NAT) on the source IP address, and sends the reply through the Internet to the user that sent the web page request.