Snat Web Server Configuration Example (en-US) PDF
Snat Web Server Configuration Example (en-US) PDF
Snat Web Server Configuration Example (en-US) PDF
Example
Set Up a Public Web Server Behind a Firebox
Example configuration files created with — WSM v11.10.1
Revised — 7/21/2015
Use Case
In this configuration example, an organization wants to set up a public web server on a protected network behind the firewall.
They want to direct incoming website traffic from the Internet to the private address of this web server. They also want local
users on their own internal network to use the public URL to browse to this website.
This configuration example is provided as a guide. Additional configuration settings could be necessary, or
more appropriate, for your network environment.
Solution Overview
When a computer sends traffic over the Internet to a server or another computer, it uses an IP address to identify the server,
and a TCP or UDP port number to identify the process on the server that receives the data. Port 80 is used for HTTP traffic.
Network Address Translation (NAT) refers to any of several forms of IP address and port translation. Static NAT, also known
as port forwarding, is a port-to-host NAT. When a packet comes in to a port on a Firebox interface, a static NAT action can
change the destination IP address to a different IP address and port behind the firewall. Static NAT also operates on traffic
sent from networks that your Firebox protects.
This solution uses a static NAT action in an HTTP-proxy policy to forward incoming traffic on port 80 to the private IP address
of the web server located behind the Firebox. This is transparent to the Internet user.
How It Works
The web server has a private IP address and is connected to a network behind an optional interface of the Firebox. In the
public DNS record for this web server, the IP address associated with the web server is the external IP address of the
Firebox.
The Firebox configuration includes an HTTP-proxy policy to handle all incoming port 80 traffic. The policy configuration
contains a static NAT action that tells the device to forward all incoming port 80 traffic to the private IP address of the web
server on the optional network.
Requirements
When an Internet user browses to the URL of the web server, the traffic comes in to the external interface of the Firebox on port
80. The HTTP-proxy policy receives the traffic and uses the IP address specified in the static NAT action to forward that web
traffic to the web server.
Requirements
A Firebox
This configuration example is for a Firebox that runs Fireware OS v11.7.2. In versions of Fireware XTM earlier than 11.4.x
the static NAT configuration looks slightly different than what is shown here.
A web server
We recommend that you do not connect publicly accessible servers, such as a web server, FTP server, or mail server, to
the same network that connects to internal users or other non-public network resources. Because these servers are
publicly accessible, they represent a potential vulnerability to your internal network. Instead, connect these publicly
accessible servers to a separate network from your other internal network resources and users. In this example, the web
server is part of a network connected to a Firebox configured as Optional, sometimes called the optional network.
Configuration Example
In this use case, the web server is located behind the Firebox on the optional network.
2 WatchGuard Fireware
Configuration Explained
Site A
Configuration Explained
The static NAT action forwards packets addressed to the Firebox external interface IP address (203.0.113.2) to the private
IP address of the web server (10.0.2.80). You can also see and edit this static NAT action from within policies where it is used.
Configuration Example 3
Configuration Explained
4 WatchGuard Fireware
Configuration Explained
From
The From section contains the Any-External alias, because this policy handles traffic that comes in to the web server
from the external interface.
To
The To section contains the static NAT action that forwards packets addressed to the Firebox external interface IP
address (203.0.113.2) to the private IP address of the web server (10.0.2.80).
Proxy action
The Proxy action is set to HTTP-Server.Standard. The default settings in the HTTP-server proxy action are the
recommended default settings for traffic to a web server.
HTTP Policy to Allow Internal Users to Use the Public Web Server URL
The example configuration contains an HTTP policy to allow the internal users to browse to the web server by its public
domain name, such as www.example.com. The HTTP policy handles traffic from the trusted network to the local web server.
This policy includes the same static NAT action as in the HTTP-proxy-server policy. Because this policy handles only internal
traffic, there is no need for deep packet inspection, so we use the HTTP packet filter policy instead of the HTTP-Proxy policy.
Configuration Example 5
Conclusion
From
To
The To section contains the same static NAT action to forward packets addressed to the Firebox external interface IP
address (203.0.113.2) to the private IP address of the web server (10.0.2.80).
This policy uses the static NAT action for traffic from users on the trusted network.
If the network has a local DNS server with a split DNS configuration, you can add a DNS record to the internal
zone to map the public domain name of the web server to its private IP address. If you do this, the HTTP policy
with the SNAT action is not necessary.
Conclusion
In this configuration example, the Internet user browses to 203.0.113.2, or to a URL that resolves to that IP address. The traffic
enters the Firebox external interface on port 80. The HTTP-proxy-server policy inspects the incoming traffic on the external
interface and forwards that traffic to the HTTP server on the private network address, 10.0.2.80. Responses from the web
server appear to the Internet user to come from IP address 203.0.113.2.
This configuration example demonstrates how to use static NAT to send web traffic to an HTTP server on a protected network.
You can also use static NAT in other policies to redirect incoming traffic to other internal servers, such as an FTP server or an
SMTP email server.
For more information about static NAT, see the Fireware Help.
6 WatchGuard Fireware
About this Configuration Example
For complete product documentation, see the Fireware Help on the WatchGuard website at:
http://www.watchguard.com/help/documentation/.
Information in this document is subject to change without notice. Companies, names, and data used in examples herein are
fictitious unless otherwise noted. No part of this guide may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of WatchGuard Technologies, Inc.
Complete copyright, trademark, patent, and licensing information can be found in the Copyright and Licensing Guide,
available online at: http://www.watchguard.com/help/documentation/.
About WatchGuard
Address
WatchGuard offers affordable, all-in-one network and content security
505 Fifth Avenue South
solutions that provide defense-in-depth and help meet regulatory
Suite 500
compliance requirements. The WatchGuard Firebox line combines
Seattle, WA 98104
firewall, VPN, GAV, IPS, spam blocking and URL filtering to protect
your network from spam, viruses, malware, and intrusions. The XCS
line offers email and web content security combined with data loss Support
prevention. WatchGuard extensible solutions scale to offer right-sized
security ranging from small businesses to enterprises with 10,000+ www.watchguard.com/support
employees. WatchGuard builds simple, reliable, and robust security U.S. and Canada +877.232.3531
appliances featuring fast implementation and comprehensive All Other Countries +1.206.521.3575
management and reporting tools. Enterprises throughout the world
rely on our signature red boxes to maximize security without
Sales
sacrificing efficiency and productivity.
U.S. and Canada +1.800.734.9905
For more information, please call 206.613.6600 or visit
All Other Countries +1.206.613.0895
www.watchguard.com.
Configuration Example 7