Cisco
Cisco 路由器上的埠轉發
我是 Cisco 新手,擁有 1841,有兩個乙太網介面:
interface FastEthernet0/0: Internal Desired destination IP: 186.67.181.140 interface FastEthernet0/1: External World IP 186.67.181.140
想做一個從外部世界到內部 IP 的 HTTP 埠轉發。
嘗試添加此規則,但不進行轉發:
ip nat inside source static tcp 192.168.1.20 80 186.67.181.140 80 extendable
知道為什麼我沒有正確進行埠轉發嗎?
完整配置:
interface FastEthernet0/0 ip address 192.168.0.1 255.255.255.0 secondary ip address 192.168.1.1 255.255.255.0 ip nat inside ip virtual-reassembly duplex auto speed auto ! interface FastEthernet0/1 ip address 186.67.181.140 255.255.255.248 ip nat outside ip virtual-reassembly duplex auto speed auto ! ip classless ip route 0.0.0.0 0.0.0.0 186.67.181.141 no ip http server no ip http secure-server ip nat inside source list 100 interface FastEthernet0/1 overload ip nat inside source static tcp 192.168.1.20 80 186.67.181.140 80 extendable ! ! access-list 100 permit ip any any access-list 111 permit ip 192.168.1.0 0.0.0.255 any access-list 111 permit ip 192.168.0.0 0.0.0.255 any
問題出在我的目的地,與思科路由器不同。
要檢查您的 cisco 路由器是否在進行埠轉發,請執行以下操作:
Router#sh ip nat trans | i 80
然後檢查是否有類似這樣的入口:
tcp 186.67.181.203:80 192.168.1.20:80 85.72.43.64:51720 85.72.43.64:51720
如果它在那裡,它正在進行埠轉發。