Cisco Router NAT and Port forwarding

host PC1
no ip routing
no ip domain-lookup
int e0/0
ip add 192.168.1.10 255.255.255.0
duplex full
no shut
ip default-gateway 192.168.1.1

line vty 0 4
transport input telnet
password cisco123

host PC2
no ip routing
no ip domain-lookup
int e0/0
ip add 192.168.1.20 255.255.255.0
duplex full
no shut
ip default-gateway 192.168.1.1

line vty 0 4
transport input telnet
password cisco123

host R1
no ip domain-lookup
int e0/0
ip add 192.168.1.1 255.255.255.0
ip nat inside
duplex full
no shut
int e0/1
ip add 218.1.1.1 255.255.255.0
ip nat outside
duplex full
no shut
ip route 0.0.0.0 0.0.0.0 218.1.1.10

ip nat inside source list 10 interface e0/1 overload
access-list 10 permit 192.168.1.0 0.0.0.255
ip nat inside source static tcp 192.168.1.10 23 218.1.1.1 23

ip nat inside source static 192.168.1.20 218.1.1.20
ip nat inside source static tcp 192.168.1.20 23 218.1.1.20 23

host Internet
no ip domain-lookup
int e0/0
ip add 218.1.1.10 255.255.255.0
duplex full
no shut
int e0/1
ip add 209.1.1.1 255.255.255.0
duplex full
no shut

host Server1
no ip routing
no ip domain-lookup
int e0/0
ip add 209.1.1.10 255.255.255.0
duplex full
no shut
ip default-gateway 209.1.1.1

Lan可以ping Server1(209.1.1.10)

Server可以telnet PC1(192.168.1.10)

PC2 1 to 1 IP mapping

Comments

No comments yet. Why don’t you start the discussion?

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

*