如何配置 Cisco 路由器 4300 以允许在公共 ip:4500 上访问内部服务器 ip:80

网络工程 思科 路由 IPv4 tcp 转发端口
2022-02-24 11:32:14

我在端口 80 上有一个内部 Web 服务器。我可能需要帮助命令来配置端口转发以从公共 IP 访问我的专用网络上的服务器

当前运行配置

interface Tunnel1
 ip unnumbered GigabitEthernet0/0/0
 tunnel source X.139.250.X
 tunnel mode ipsec ipv4
 tunnel destination X.232.253.X
 tunnel protection ipsec profile 3DESMD5
!
interface Tunnel2
 ip unnumbered GigabitEthernet0/0/0
 tunnel source X.139.250.X
 tunnel mode ipsec ipv4
 tunnel destination X.232.2.X
 tunnel protection ipsec profile 3DESMD5
!
interface GigabitEthernet0/0/0
 description SAF WAN
 ip address X.139.250.X 255.255.255.0
 ip nat outside
 negotiation auto
!
interface GigabitEthernet0/0/1
 description LAN
 ip address X.21.10.X 255.255.255.0
 ip nat inside
 negotiation auto
!
interface GigabitEthernet0/0/2
 no ip address
 shutdown
 negotiation auto
!
interface GigabitEthernet0
 vrf forwarding Mgmt-intf
 no ip address
 shutdown
 negotiation auto
!
interface Vlan1
 no ip address
 shutdown
!
ip nat inside source list 102 interface GigabitEthernet0/0/0 overload
ip forward-protocol nd
no ip http server
no ip http secure-server
ip tftp source-interface GigabitEthernet0
ip route 0.0.0.0 0.0.0.0 X.139.250.220
ip route X.31.15.X 255.255.255.0 Tunnel1 name VPN-HQ(/24)
ip route X.31.40.X 255.255.252.0 Tunnel2 name VPN-PALE
ip route X.32.0.X 255.255.0.0 Tunnel1 name VPN-HQ(/16)
!
!
access-list 102 permit ip X.21.10.X 0.0.0.255 any
!
!
!
control-plane
!
!
1个回答

根据您的要求,需要建立入站连接以访问托管在内部网络内的应用程序从外部访问它

cisco 4300 路由器需要静态 NAT 配置,以隐藏内部服务器 IP 地址以防止暴露在外部

由 ISP 提供的 NAT 公共 IP 地址与服务器私有 IP 地址。

**例子 **

Nat configuration

Router(config) ip nat inside souce static 203.X.X.X 192.168.X.X

其中 203.XXX = ISP 提供的公共 IP 地址

192.168.XX = 服务器的私有 IP 地址