This article describes how to change Incoming or outgoing ports for any traffic flow that goes through the SonicWall. This process is also known as PAT'ing or Port Address Translation (PAT).
For this process the device can be any of the following:
Don't want to read? Watch instead!
Manually translating Ports from a host on the Internet to a server, or vice versa, behind the SonicWall using SonicOS involves the following steps:
These steps will also allow you to enable port address translation with or without altering the IP addresses involved. If you'd also like to alter the IPs via Network Address Translation (NAT) please see How to Enable Port Forwarding and Allow Access to a Server Through the SonicWall.
TIP: The public server wizard is a straightforward and simple way to setup Port Address Translation through the SonicWall. The public server wizard will simplify the above three steps by prompting your for information and creating the necessary settings automatically.
CAUTION: The SonicWall security appliance is managed by HTTP (Port 80) and HTTPS (Port 443), with HTTPS management being enabled by default. If you are using one or more of the WAN IP addresses for HTTP/HTTPS port forwarding to a server then you must change the management Port to an unused Port, or change the Port when navigating to your server via NAT or another method.
The following snapshot is from SonicOS 7.x
The following snapshot is from SonicOS 6.x
This release includes significant user interface changes and many new features that are different from the SonicOS 6.5 and earlier firmware. The below resolution is for customers using SonicOS 7.X firmware.
The following walk-through details a request on port 4000 coming into the SonicWall via the WAN and being forwarded to a server on the LAN as Port 80 (HTTP). Once the configuration is complete, Internet Users can access the server via port 4000. Although the examples below show the LAN Zone and HTTP (Port 80) they can apply to any zone and any port that is required. Similarly, the WAN IP address can be replaced with any Public IP that is routed to the SonicWall, such as a public range provided by an ISP.
Creating the two Address Objects
1-Created the necessary private Address Objects.
2-Created the necessary public Address Objects.
3-Creating the necessary Service Object
4-Creating the appropriate PAT Policies which can include Inbound, Outbound, and Loopback
To allow access to a local server from outside, will require creating two the appropriate NAT Policies; Inbound and Outbound .
A NAT Policy will allow SonicOS to translate incoming packets destined for a public IP address to a private IP address, and/or a specific port to another specific port. Every packet contains information about the Source and Destination IP addresses and ports and with a NAT policy SonicOS can examine packets and rewrite those addresses and ports for incoming and outgoing traffic.
NOTE: When creating a NAT policy you may select the "Create a reflexive policy" checkbox". This will create an inverse policy automatically, in the example below adding a reflexive policy for the NAT Policy for inbound connections will also create the NAT Policy for outbound connections. This option is not available when configuring an existing NAT policy, only when creating a new policy.
Loopback NAT Policy
A Loopback NAT Policy is required when Users on the local LAN/WLAN need to access an internal server via its public IP/Public DNS name. This policy will loopback the users request for access as coming from the public IP of the WAN and then translate down to the private IP of the server. Without a Loopback NAT policy internal Users will be forced to use the private IP of the server to access it which will typically create problems with DNS.
If you wish to access this server from other internal zones using the public IP address http://1.1.1.1 consider creating a Loopback NAT Policy:
5-Creating the necessary Firewall Access Rules
This release includes significant user interface changes and many new features that are different from the SonicOS 6.2 and earlier firmware. The below resolution is for customers using SonicOS 6.5 firmware.
The following walk-through details a request on port 4000 coming into the SonicWall via the WAN and being forwarded to a server on the LAN as Port 80 (HTTP). Once the configuration is complete, Internet Users can access the server via port 4000. Although the examples below show the LAN Zone and HTTP (Port 80) they can apply to any zone and any port that is required. Similarly, the WAN IP address can be replaced with any Public IP that is routed to the SonicWall, such as a public range provided by an ISP.
TIP: If your user interface looks different to the screenshots in this article, you may need to upgrade your firmware to the latest firmware version for your appliance. To learn more about upgrading firmware, please see Procedure to Upgrade the SonicWall UTM Appliance Firmware Image with Current Preferences.
Creating the necessary Address Objects
Creating the necessary Service Object
Creating the appropriate PAT Policies which can include Inbound, Outbound, and Loopback
A NAT Policy will allow SonicOS to translate incoming packets destined for a public IP address to a private IP address, and/or a specific port to another specific port. Every packet contains information about the Source and Destination IP addresses and ports and with a NAT policy SonicOS can examine packets and rewrite those addresses and Ports for incoming and outgoing traffic.
NOTE: When creating a NAT policy you may select the "Create a reflexive policy" checkbox". This will create an inverse policy automatically, in the example below adding a reflexive policy for the NAT Policy on the left will also create the NAT Policy on the right. This option is not available when configuring an existing NAT policy, only when creating a new policy.
Loopback NAT Policy
A Loopback NAT Policy is required when Users on the local LAN/WLAN need to access an internal server via its public IP/Public DNS name. This policy will loopback the users request for access as coming from the public IP of the WAN and then translate down to the private IP of the server. Without a Loopback NAT policy internal Users will be forced to use the private IP of the server to access it which will typically create problems with DNS.
If you wish to access this server from other internal zones using the public IP address Http://1.1.1.1 consider creating a Loopback NAT Policy:
Creating the necessary Firewall Access Rules