Does NAT occur before or after routing?

  • I got one problem, If my broader enable nat, I wonder if routing occur before nat ? if someone know about this, can you tell me?

  • Rebel Alliance Developer Netgate

    Outbound NAT happens as the traffic exits an interface. Routing decisions happen before that point.

    To oversimplify it a bit:

    • Packet enters firewall
    • Routing table (or policy routing) decides which interface the packet will exit
    • Outbound (source) NAT applies as the traffic leaves that interface

Log in to reply