NAT is network address translation. Mostly used for translate IP private to IP public and vice versa. Beside of that, NAT have security function.
Let’s do lab of NAT port forwarding
R1#
interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
ip ospf 1 area 0
no shu
!
line vty 0 4
password cisco
login
R2#
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
ip ospf 1 area 0
no shu
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
ip ospf 1 area 0
no shu
R3#
interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf 1 area 0
no shu
!
interface FastEthernet0/0
ip address 23.23.23.3 255.255.255.0
ip ospf 1 area 0
no shu
!
line vty 0 4
password cisco
login
Let’s do translation using telnet port forwarding
R2#
int f0/0
ip nat inside
!
Int f0/1
ip nat outside
!
ip nat inside source static tcp 12.12.12.1 23 interface FastEthernet0/1 23
Verify NAT
R2#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 23.23.23.2:23 12.12.12.1:23 --- ---
Test by telnet port 23
R3#telnet 23.23.23.2
Trying 23.23.23.2 ... Open
User Access Verification
Check NAT again
R2#sh ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 23.23.23.2:23 12.12.12.1:23 23.23.23.3:60011 23.23.23.3:60011
tcp 23.23.23.2:23 12.12.12.1:23 --- ---
No comments:
Post a Comment