Here is an little explanation about NAT configured on Cisco devices.
HOME PC —————> ROUTER external IP ———->provider/external server
INSIDE LOCAL INSIDE GLOBAL OUTSIDE GLOBAL
First define your interfaces:
– Go to the internal interface en make it inside local:
en
conf t
interface FastEthernet 0/1
ip nat inside
control+z
– Go to the external interface and make it inside global:
en
conf t
interface FastEthernet 0/1
ip nat outside
control+z
– Save the config
copy running-config startup-config
====================================
PAT with and pool of internal addresses
Internal addresses NAT outside with an access list!
– Make and access-list with the internal addresses
en
conf t
ip access-list standard INSIDE_NAT_ADDRESSES
permiet
– Direct the the pool of internal addresses the outside address
ip nat inside source list INSIDE_NAT_ADDRESSES (interface or pool of addresseses) interface fastethernet 0/1 (or other external port) overload
One address NAT outside with an access list!
– View translations with the command
show ip nat translation
====================================
Dynamic NAT from an local pool to an pool of external (public) addresses
-Define your external (public) ip-addresses
en
conf t
ip nat pool OUTSIDE_PUBLIC netmask 255.255.255.248
-then create the PAT
ip nat inside source list pool OUTSIDE_PUBLIC overload
====================================
Static NAT
All the ports direct to internal machine:
ip nat inside source static
Redirect only port 80 from external to one internal device:
ip nat inside source static tcp local_ip (inside local) 80 Extern_IP (outside global) 80 (static NAT for port 80)
====================================