Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityIntermediate

Configuring NAT on Cisco IOS: static NAT, dynamic NAT, PAT and port forwarding

In short: Cisco NAT needs three things: interfaces marked inside and outside, a rule saying what to translate, and a target address. Static NAT maps one private address permanently, dynamic NAT borrows addresses from a pool, PAT shares one public address using port numbers, and port forwarding publishes a single service. Verify with show ip nat translations.

The building blocks

Network Address Translation lets hosts with private addresses reach public networks and lets you publish internal servers. The idea is covered in NAT: how many devices share one internet address; here the focus is Cisco IOS configuration. Every NAT configuration has the same parts:

  1. Mark interfaces as ip nat inside (towards your LAN) or ip nat outside (towards the provider).
  2. Say which addresses to translate: one address for static NAT, or an ACL for dynamic NAT and PAT.
  3. Say what to translate them to: an address, a pool, or the outside interface.
NAT address termsInside (your network)Inside local: 192.168.1.20Inside global: 203.0.113.10Local = as seen insideGlobal = as seen outsideOutside (the internet)Outside global: 198.51.100.7Outside local: usually the sameChanges only with outside NATRarely needed
Figure 1. The four NAT address terms. Most configurations only translate inside local addresses to inside global ones.

The examples use LAN 192.168.1.0/24 on GigabitEthernet0/1 and a provider link on GigabitEthernet0/0, with public block 203.0.113.0/27 (a documentation range).

interface GigabitEthernet0/1
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
!
interface GigabitEthernet0/0
 ip address 203.0.113.2 255.255.255.224
 ip nat outside

Static NAT and port forwarding

Static NAT permanently maps one inside address to one public address in both directions. Use it for a server that must be reachable on many ports, or a device that must always appear with the same public address.

ip nat inside source static 192.168.1.20 203.0.113.10

Port forwarding (static PAT) maps only one port, so one public address can serve several internal hosts on different ports. Here HTTPS on the router's own outside address goes to a web server:

ip nat inside source static tcp 192.168.1.30 443 interface GigabitEthernet0/0 443

Publishing a server makes it reachable from the internet, so also filter inbound traffic to just that port with an ACL or firewall, and keep the server patched.

Dynamic NAT and PAT

Choosing a NAT typeStatic NATone-to-one, permanentDynamic NATone-to-one from a poolPAT (overload)many-to-one by portPort forwardingone port to one hostPolicy NATroute-map decides
Figure 2. PAT is what almost every office and home router uses. Static NAT and port forwarding publish internal servers.

Dynamic NAT gives each inside host a public address from a pool while it is active. If the pool runs out, new hosts cannot connect, so it is uncommon today.

access-list 1 permit 192.168.1.0 0.0.0.255
ip nat pool PUBLIC 203.0.113.20 203.0.113.29 netmask 255.255.255.224
ip nat inside source list 1 pool PUBLIC

PAT, also called NAT overload, lets many hosts share one public address by tracking the source port of each connection. This is what nearly every office and home router does.

access-list 1 permit 192.168.1.0 0.0.0.255
ip nat inside source list 1 interface GigabitEthernet0/0 overload

Adding overload to a pool configuration gives PAT across several public addresses. The ACL decides what is translated, so make it match exactly your internal ranges; a permit any can translate traffic you never meant to.

Verifying and troubleshooting

show ip nat translations
show ip nat statistics
clear ip nat translation *
debug ip nat

show ip nat translations lists each mapping with inside local, inside global, outside local and outside global addresses (and ports for PAT). show ip nat statistics shows the inside and outside interfaces, hits, misses and pool usage. If NAT does not work, check in order:

  • Inside and outside are on the correct interfaces (swapping them is the most common mistake).
  • The ACL matches the real source addresses of your hosts.
  • The router has a route to the internet, and the provider routes the public addresses back to you.
  • A dynamic pool is not exhausted (statistics show misses).
  • For port forwarding, the server uses the router as its default gateway, so replies are translated back.

Real-world example: a dental practice moved its appointment server to a new address, 192.168.1.25, but patients could no longer book online. The router still had ip nat inside source static tcp 192.168.1.20 443 ... pointing at the old address. show ip nat translations showed the forward to .20, which no longer existed. Updating the static entry and clearing the translations restored bookings within a minute, and the practice added the NAT entry to its change checklist for server moves.

Practice

In a PAT translation, what lets the router tell 50 hosts apart when they share one public address?
The source port numbers. Each connection gets a unique combination of public address and port.
Which address is the inside global address?
The public address that represents an inside host to the outside world.
NAT is configured but show ip nat translations is empty while users browse. Name two things to check.
That ip nat inside and ip nat outside are on the correct interfaces, and that the ACL used by the NAT rule matches the users' source addresses.

Key takeaways

  • Mark interfaces inside and outside, then define what to translate and to what.
  • Static NAT is one-to-one and permanent; port forwarding publishes one port.
  • Dynamic NAT uses a pool; PAT (overload) shares one address using ports.
  • Keep the NAT ACL tight; it decides which traffic is translated.
  • Verify with show ip nat translations and show ip nat statistics.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.