NAT configuration

Submitted on Sun, 07/06/2025 - 09:11

conf t

! Configure extended ACL 100 to block ICMP to 8.8.8.2
ip access-list extended 100
 10 deny icmp 192.168.1.0 0.0.0.255 host 8.8.8.2
 20 permit ip any any
exit

! Configure standard ACL for NAT
ip access-list standard NAT_ACL
 10 permit 192.168.1.0 0.0.0.255
exit

! Configure inside interface
interface g0/0/0
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 no shutdown
exit

! Configure outside interface
interface g0/0/0
 ip address 8.8.8.1 255.255.255.0
 ip nat outside
 no shutdown
exit


! Configure NAT overload using NAT_ACL
ip nat inside source list NAT_ACL interface g0/0/1 overload

! Apply ACL 100 to outbound interface
interface g0/0/1
 ip access-group 100 out
exit


end