Manually opening Ports / enabling Port forwarding to allow traffic from the Internet to a Server behind the SonicWall using SonicOS involves the following steps:
Logging into the SonicWall via the CLI
Creating the necessary Address Objects and Service Objects
Creating the appropriate NAT Policies which can include Inbound, Outbound, and Loopback
Creating the necessary Firewall Access Rules
TIP: The Public Server Wizard is a straightforward and simple way to provide public access to an internal Server 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.
EXAMPLE: This example covers allowing Port 80 (HTTP) from the Internet to a server on the LAN with private IP address as 192.168.1.100. Once the configuration is complete, Internet users can access the Port 80 services behind the SonicWall firewall through the WAN (Public) IP address of 188.8.131.52.
Creating the Necessary Address Objects and Service Objects Server Private IP Address Object configure address-object ipv4 "My Webserver Private" host 192.168.1.100 zone LAN commit
Server Public IP Address Object address-object ipv4 "My Webserver Public" host 184.108.40.206 zone WAN commit
HTTP Service Object service-object "Example Service Object" TCP 639 639 commit
Creating the appropriate NAT Policies which can include Inbound, Outbound, and Loopback Inbound NAT nat-policy inbound X1 outbound X0 source any translated-source original destination name "Example Name Public" translated-destination name "Example Name Private" service name "Example Service Object" translated-service original commit
Outbound NAT nat-policy inbound X0 outbound X1 source name "My Webserver Private" translated-source name "My Webserver Public" destination any translated-destination original service name "HTTP" translated-service original commit
Loopback NAT Policy nat-policy inbound X0 outbound any source name "Firewalled Subnets" translated-source name "Example Name Public" destination name "Example Name Public" translated-destination name "Example Name Private" service name "Example Service Object" translated-service original commit
Creating the necessary Firewall Access Rules access-rule from WAN to LAN action allow source address any service name "Example Service Object" destination address any schedule always-on commit