Numbers 6:24-26The Lord bless you and keep you; the Lord make His face to shine upon you; the Lord lift up His countenance upon you and give you peace.

Port Address Translation (PAT) on SonicWall
Security2026-06-28ZP Technical

Port Address Translation (PAT) on SonicWall

Step-by-step configuration guide for setting up Port Address Translation on SonicWall firewalls, including Address Objects, Service Objects, NAT Policies, and Access Rules.

Step-by-step configuration guide for setting up Port Address Translation on SonicWall firewalls, including Address Objects, Service Objects, NAT Policies, and Access Rules.

A. Address Objects

Create two address objects: one for the internal device (e.g. a printer on the LAN) and one for the public-facing IP on the WAN.

A1 — Internal Device

Name(Printer)
Zone AssignmentLAN
TypeHost
IP Address(x.x.x.x)

A2 — Public IP

Name(Public IP)
Zone AssignmentWAN
TypeHost
IP Address(x.x.x.x)

B. Service Objects

Create two service objects: one for the incoming (external) port and one for the outgoing (internal) port.

B1 — Incoming Service

NamePAT (incoming)
ProtocolTCP(6)
Port Range(incoming port e.g. 9112-9112)

B2 — Outgoing Service

NamePAT (outgoing)
ProtocolTCP(6)
Port Range(outgoing port e.g. 9100-9100)

C. NAT Policies

Three NAT policies are required: the primary PAT rule, a reflective rule for internal-to-external traffic, and a loopback rule for LAN-to-LAN access via the public IP.

NAT Policy — PAT (Primary)

NamePAT
Original SourceAny (e.g. 0.0.0.0/0)
Translated SourceOriginal
Original Destination(A2)
Translated Destination(A1)
Original Service(B1)
Translated Service(B2)
Inbound InterfaceX1
Outbound InterfaceAny

NAT Policy — PAT (Reflective)

NamePAT (reflective)
Original Source(A1)
Translated Source(A2)
Original DestinationAny
Translated DestinationOriginal
Original Service(B2)
Translated ServiceOriginal
Inbound InterfaceAny
Outbound InterfaceX1

NAT Policy — PAT (Loopback)

NamePAT (loopback)
Original SourceFirewalled Subnets
Translated Source(A2)
Original Destination(A2)
Translated Destination(A1)
Original Service(B1)
Translated Service(B2)
Inbound InterfaceAny
Outbound InterfaceAny

D. Access Rules (SonicOS 6)

Create an access rule to permit inbound WAN traffic on the translated service to reach the internal device.

NamePAT
ActionAllow
FromWAN
ToLAN
Source PortAny (e.g. 0.0.0.0/0)
Service(B1)
SourceAny (e.g. 0.0.0.0/0)
Destination(A2)
Users IncludedAll
Users ExcludedNone
ScheduleAlways on
PriorityRetain original priority

D. Access Rules (SonicOS 7)

SonicOS 7 uses a redesigned Access Rules interface. Configure source and destination separately as shown below.

Rule Name: PAT

Source

Zone/InterfaceWAN
AddressAny (e.g. 0.0.0.0/0)
Port/ServicesAny

Destination

Zone/InterfaceLAN
Address(A2)
Port/Services(B1)