interface Ethernet0/0
ip address 12.1.1.2 255.255.255.0
ip nat outside
ip virtual-reassembly
half-duplex
!
interface Ethernet0/1
ip address 25.1.1.2 255.255.255.0
ip nat inside
ip virtual-reassembly
full-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
no ip http server
no ip http secure-server
!
ip forward-protocol nd
ip route 25.1.1.88 255.255.255.255 12.1.1.1 //此为重点,配置目标地址NAT的路由指向转换目的的方向
ip route 172.16.1.0 255.255.255.0 25.1.1.5
ip route 172.16.2.0 255.255.255.0 25.1.1.5
ip route 172.16.3.0 255.255.255.0 25.1.1.5
ip route 192.168.1.1 255.255.255.255 12.1.1.1
!
ip nat inside source list 1 interface Ethernet0/0 overload//源地址NAT
ip nat outside source static tcp 192.168.1.1 23 25.1.1.88 6501 extendable//目标地址NAT,将访问25.1.1.88目标地址的流量转换为192.168.1.1
!
access-list 1 permit 172.16.1.0 0.0.0.255
access-list 1 permit 172.16.2.0 0.0.0.255
access-list 1 permit 172.16.3.0 0.0.0.255