SonicOS 8 Rules and Policies for Classic Mode
- SonicOS 8 Rules and Policies
- Overview
- Access Rules
- Setting Firewall Access Rules
- About Connection Limiting
- Using Bandwidth Management with Access Rules
- Creating Access Rules
- Configuring Access Rules for IPv6
- Enabling and Disabling Access Rules
- Editing Access Rules
- Deleting Access Rules
- Restoring Access Rules to Default Settings
- Displaying Access Rules
- Displaying Access Rule Traffic Statistics
- Configuring Access Rules for NAT64
- Configuring Access Rules for a Zone
- Access Rules for DNS Proxy
- User Priority for Access Rules
- Access Rule Configuration Examples
- Setting Firewall Access Rules
- NAT Rules
- About NAT in SonicOS
- About NAT Load Balancing
- About NAT64
- About FQDN-based NAT
- About Source MAC Address Override
- Viewing NAT Policy Entries
- Adding or Editing NAT or NAT64 Rule Policies
- Deleting NAT Policies
- Creating NAT Rule Policies: Examples
- Creating a One-to-One NAT Policy for Inbound Traffic
- Creating a One-to-One NAT Policy for Outbound Traffic
- Inbound Port Address Translation via One-to-One NAT Policy
- Inbound Port Address Translation via WAN IP Address
- Creating a Many-to-One NAT Policy
- Creating a Many-to-Many NAT Policy
- Creating a One-to-Many NAT Load Balancing Policy
- Creating a NAT Load Balancing Policy for Two Web Servers
- Creating a WAN-to-WAN Access Rule for a NAT64 Policy
- DNS Doctoring
- Routing
- DNS Rules
- Content Filter Rules
- App Rules
- About App Rules
- Rules and Policies > App Rules
- Verifying App Rules Configuration
- App Rules Use Cases
- Creating a Regular Expression in a Match Object
- Policy-based Application Rules
- Logging Application Signature-based Policies
- Compliance Enforcement
- Server Protection
- Hosted Email Environments
- Email Control
- Web Browser Control
- HTTP Post Control
- Forbidden File Type Control
- ActiveX Control
- FTP Control
- Bandwidth Management
- Bypass DPI
- Custom Signature
- Reverse Shell Exploit Prevention
- Endpoint Rules
- SonicWall Support
Inbound Port Address Translation via WAN IP Address
This is one of the more complex NAT policies you can create on a firewall running SonicOS — it allows you to use the WAN IP address of the firewall to provide access to multiple internal servers. This is most useful in situations where your ISP has only provided a single public IP address, and that IP address has to be used by the firewall’s WAN interface (by default, the X1 interface).
Below, create the programming to provide public access to two internal web servers through the firewall’s WAN IP address; each is tied to a unique custom port. It is possible to create more than two as long as all the ports are unique.
To use the WAN IP address of the firewall to provide access to multiple internal servers
- Create two custom service objects for the unique public ports the servers respond on. See Create Services.
- Create two address objects for the servers’ private IP addresses. See Create Addresses.
- Create two NAT policies to allow the two servers to initiate traffic to the public internet. See Create Outbound NAT Policies.
- Create two NAT policies to map the custom ports to the actual listening ports, and to map the private IP addresses to the firewall’s WAN IP address. See Create Inbound NAT Policies.
- Create two access rules to allow any public user to connect to both servers via the firewall’s WAN IP address and the servers’ respective unique custom ports. See Create Access Rules.
To create an inbound port address translation policy via WAN IP address
Create Services
- Navigate to the OBJECT | Match Objects > Services page.
- Click +Add. The Service Objects dialog displays.
- Create two Service Objects. For Name, enter your custom service object names, such as
servone_public_port
andservtwo_public_port
. - For each, select TCP(6) as the Protocol.
- Enter 9100 as the starting and ending ports for
servone_public_port.
- Enter 9200 as the starting and ending ports for
servtwo_public_port
. -
After configuring each custom service, click Save to save the custom services.
-
After configuring both custom services, click Close.
Create Addresses
- Navigate to the OBJECT | Match Objects > Addresses page. Create two Address Objects.
- Click +Add. The Address Object Settings dialog displays.
- For Name, enter your custom address object name, such as
servone_private_ip
andservtwo_private_ip
. - Select the zone that the servers are in from the Zone Assignment drop-down menu.
- Choose Host from the Type drop-down menu.
- Enter the server’s private IP addresses in the IP Address field.
-
After configuring each address object, click Save to create the address object.
-
After configuring both address objects, click Close.
Create Outbound NAT Policies
- Navigate to the POLICY | Rules and Policies > NAT Rules page.
- Click +Add. The Adding NAT Rule Two_Serversdialog displays.
-
To create two NAT policies to allow both servers to initiate traffic to the public internet using the firewall’s WAN IP address, configure the two sets of options shown in the Option Choices: Two Servers to Initiate Traffic to the Internet table.
-
After configuring the NAT policy for each server, click Add to add and activate that NAT policy.
-
After configuring both NAT policies, click Cancel.
With these policies in place, the firewall translates the servers’ private IP addresses to the public WAN IP address when it initiates traffic out the WAN interface (by default, the X1 interface).
Create Inbound NAT Policies
- Click +Add on the POLICY | Rules and Policies > NAT Rules page again. The Adding NAT Rule dialog displays.
-
To create two NAT policies to map the custom ports to both servers’ real listening ports and to map the firewall’s WAN IP address to the servers’ private addresses, configure the two sets of options shown in the Option Choices: Mapping Custom Ports to Servers table.
-
After configuring the NAT policy for each server, click Add to add and activate that NAT policy.
-
After configuring both NAT policies, click Cancel.
Create Access Rules
- Navigate to the POLICY | Rules and Policies > Access Rules page.
- Click +Add. The Adding Rule dialog displays.
-
To create the two access rules that allow anyone from the public Internet to access the two web servers using the custom ports and the firewall’s WAN IP address, configure the two sets of options shown in the Option Choices: Creating Access Rules table.
-
After configuring the access rule for each server, click Add to add and activate that access rule.
-
After configuring both access rules, click Cancel.
Test and Verify
To verify, attempt to access the web servers via the firewall’s WAN IP address using a system located on the public internet on the new custom port (for example: http://67.115.118.70:9100
and http://67.115.118.70:9200
). You should be able to successfully connect. If not, review this section and ensure that you have configured all required settings correctly.
Was This Article Helpful?
Help us to improve our support portal