我一直在尝试使用新安装的思科路由器进行端口转发。 我似乎无法find我的错在哪里,并一直在寻找一段时间。
我的configuration的相关部分:
interface FastEthernet0/0 ip address dhcp ip nat outside speed 100 full-duplex no cdp enable ! interface FastEthernet0/1 ip address 10.10.250.1 255.255.255.0 ip nat inside speed 100 full-duplex ! router eigrp 250 passive-interface FastEthernet0/0 network 10.10.250.0 0.0.0.255 no auto-summary ! ip nat inside source list NAT interface FastEthernet0/0 overload ip nat inside source static udp 10.10.250.201 9987 interface FastEthernet0/0 9987 ip nat inside source static tcp 10.10.250.201 30033 interface FastEthernet0/0 30033 ip nat inside source static tcp 10.10.250.201 10011 interface FastEthernet0/0 10011 ip nat inside source static tcp 10.10.250.201 22 interface FastEthernet0/0 443 ip nat inside source static tcp 10.10.250.201 80 interface FastEthernet0/0 80 no ip http server no ip http secure-server ip classless ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 dhcp ! ! ! ip access-list extended NAT permit ip any any
有什么地方我的configuration有问题? 还是我错过了一些必要的东西来获得端口转发工作?
下面是当前的NAT表格,只显示我的规则:
cisco2621#show ip nat tran Pro Inside global Inside local Outside local Outside global udp xxxx:9987 10.10.250.201:9987 --- --- tcp xxxx:10011 10.10.250.201:10011 --- --- tcp xxxx:80 10.10.250.201:80 --- --- tcp xxxx:443 10.10.250.201:22 --- --- tcp xxxx:30033 10.10.250.201:30033 --- ---
端口转发中混合了源和目的地。
ip nat inside source static udp interface FastEthernet0/0 9987 10.10.250.201 9987 extendable ip nat inside source static tcp interface FastEthernet0/0 30033 10.10.250.201 30033 extendable ip nat inside source static tcp interface FastEthernet0/0 10011 10.10.250.201 10011 extendable ip nat inside source static tcp interface FastEthernet0/0 443 10.10.250.201 22 extendable ip nat inside source static tcp interface FastEthernet0/0 80 10.10.250.201 80 extendable
同样使用标准访问列表,只允许本地networking通过NAT。
ip access-list standard NAT permit ip 10.10.250.0 0.0.0.255
我已经做了很长时间NAT'ing了,但是在你的“ip nat inside …”这行里面,你可以在最后加上一个接口吗? 我认为它需要是接口的适当的IP地址。 但是,在您的configuration中,可能会因DHCP而起作用。
尝试以下命令来帮助缩小问题的范围:
show ip nat translations debug ip nat (then try to generate traffic that should hit the NAT and see what hits the console) show ip nat stat
此外,由于您目前没有过滤任何内容,请不要使用扩展访问列表。 不应该有所作为,但它是3秒的尝试。
access-list 10 permit any