Network Address Translation (NAT) modifies IP address information in packet headers as they pass through a router or firewall.
Types of NAT
SNAT (Source NAT)
- Changes the source IP address of outgoing packets
- Used when internal hosts need to access the internet using a single public IP
- Also called IP masquerading or PAT (Port Address Translation)
DNAT (Destination NAT)
- Changes the destination IP address of incoming packets
- Used to forward traffic from a public IP to an internal server
- On FortiGate, this is done with VIPs (Virtual IPs)
NAT in FortiGate session output:
act=snat— source NAT appliedact=dnat— destination NAT appliedhook=pre— applied before forwarding (ingress)hook=post— applied after forwarding (egress)