在配置1841以允许外部访问将某些端口映射到内部地址时遇到问题。
需要允许以下方面:
外部IP:端口8080至192.168.3.50外部IP:端口8081至192.168.3.51
下面是1841的配置:
FT-ROUTER#sh run
Building configuration...
Current configuration : 2394 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname FT-ROUTER
!
boot-start-marker
boot system flash c1841-ipbasek9-mz.124-20.T.bin
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
!
ip dhcp excluded-address 192.168.3.1 192.168.3.5
ip dhcp excluded-address 192.168.2.1 192.168.2.5
ip dhcp excluded-address 192.168.1.1 192.168.1.5
!
ip dhcp pool MAINDATA
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 68.105.28.16 68.105.29.16
!
ip dhcp pool PUBLICWIFI
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 68.105.28.16 68.105.29.16
!
ip dhcp pool SECURITY
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
dns-server 68.105.28.16 68.105.29.16
!
!
ip cef
no ip domain lookup
!
interface FastEthernet0/0
ip address 98.190.71.2 255.255.255.240
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.100
description FT-MAIN-DATA
encapsulation dot1Q 100
ip address 192.168.1.1 255.255.255.0
ip nat inside
ip virtual-reassembly
!
interface FastEthernet0/1.200
description FT-PUBLIC-WIRELESS
encapsulation dot1Q 200
ip address 192.168.2.1 255.255.255.0
ip nat inside
ip virtual-reassembly
!
interface FastEthernet0/1.300
encapsulation dot1Q 300
ip address 192.168.3.1 255.255.255.0
ip nat inside
ip virtual-reassembly
!
!
ip default-gateway 98.190.71.1
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 98.190.71.1
!
ip nat inside source list 10 interface FastEthernet0/0 overload
!
access-list 10 permit 192.168.1.0 0.0.0.255
access-list 10 permit 192.168.2.0 0.0.0.255
access-list 10 permit 192.168.3.0 0.0.0.255
下面是一个基本的图表:
发布于 2016-11-16 22:04:30
下面是一个常规的静态PAT语句。
ip nat inside source static tcp 192.168.3.50 8080 98.190.71.2 8080 extendable
ip nat inside source static tcp 192.168.3.51 8081 98.190.71.2 8081 extendable
这可能是UDP流量所需要的。
ip nat inside source static udp 192.168.3.50 8080 98.190.71.2 8080 extendable
ip nat inside source static udp 192.168.3.51 8081 98.190.71.2 8081 extendable
发布于 2021-01-11 07:05:16
您的要求似乎是入站通信量,希望从外部网络访问内部网络中承载的服务器。要建立此连接,静态存储必须在边缘设备或外围设备中进行配置。
路由器(配置)# ip nat在源静态192.168 .3.50 X.X eq 8080中
路由器(配置)#ip nat内部静态192.168 3.51 X.X eq 8081
其中X.X是外部的(公共IP地址)
https://networkengineering.stackexchange.com/questions/36572
复制相似问题