[英]Forwarding over two routers
我正在嘗試解決通過兩個路由器訪問 Web 服務器的問題。 查看圖表訪問如下:
case 1: computer - dir-100 - 4321 - web-server 1 - accessible
case 2: internet - dir-100 - web-server 2 - accessible
case 3: internet - dir-100 - 4321 - web-server 1 - is not accessible
cisco 上的配置就像通過一切:
ip nat inside source list INTERNET_NAT_ACCESS-LIST interface GigabitEthernet0/1/0 overload
ip nat outside source static 192.168.0.103 192.168.3.1
ip forward-protocol nd
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 ISP-DNS
ip route ISP-DNS 255.255.255.255 192.168.0.1
!
!
ip access-list extended INTERNET_NAT_ACCESS-LIST
permit ip host 192.168.3.0 any
D-Link DIR-100 上的配置是標准配置,但添加了到 Web 服務器 1 的路由:
Interface(ISP) - Destination(192.168.3.2) - Mask (255.255.255.255) - Gateway(192.168.0.103)
同樣適用於案例 2:我添加了端口轉發,沒有它,案例 2 顯然無法正常工作
當我嘗試將 DIR-100 上的端口轉發設置為192.168.0.103
這是 cisco 路由器的輸入接口時,沒有運氣從互聯網訪問 web-server 1
思科上的 NAT:
r1#show ip nat translations
Pro Inside global Inside local Outside local Outside global
--- --- --- 192.168.3.1 192.168.0.103
接口:
r1#show ip int brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 192.168.3.1 YES NVRAM up up
GigabitEthernet0/0/1 unassigned YES NVRAM administratively down down
GigabitEthernet0/1/0 192.168.0.103 YES DHCP up up
GigabitEthernet0 unassigned YES NVRAM down down
Vlan1 unassigned YES unset administratively down down
有什么想法嗎? 謝謝。
默認情況下,思科路由器配置為拒絕任何流量,如果它沒有在我的配置中精確配置,它也會被拒絕,盡管
ip nat outside source static 192.168.0.103 192.168.3.1
因此,如果您想在某個特定點上打個洞,您必須以如此直接的方式編寫它,在我的情況下,允許端口轉發到 Web 服務器
ip nat inside source static tcp 192.168.3.2 80 192.168.0.103 80
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.