访问 NAT 后的外部 IP

网络工程 思科 纳特 ip
2022-03-04 17:58:58

我找到了很多文章,这个主题的可能解决方案,但似乎没有人和我有同样的问题。我正在使用 IOS 12.4 开发 Cisco 1812 路由器。我发现了一些诸如发夹和 DNS 篡改之类的方法,但这些方法听起来并不正确,因为每个解决方案都针对您无法通过其域名访问它的问题。

我们有 2 个外部 IP 地址 xxx100 和 xxx101,它们与内部地址 iii100 和 iii101 相关联。

所以 xxx100 -> iii100

和 xxx101 -> iii101

我的配置:

ip nat inside source route-map SDM_RMAP_1 interface FastEthernet0 overload
    ip nat inside source static i.i.i.100 x.x.x.100 route-map SDM_NAT_TEST
    ip nat inside source static i.i.i.101 x.x.x.101 route-map DM_RMAP_1

interface FastEthernet0
 description Interface Outside
 ip address <external IP> 255.255.255.240
 ip access-group Internet in
 ip nat outside
 ip inspect firewall out
 ip virtual-reassembly
 ip tcp adjust-mss 1452
 duplex auto
 speed auto
 crypto map vpn
 service-policy output CLEAR-TOS
!         
interface FastEthernet1
 description Interface Inside
 ip address 172.16.18.1 255.255.255.0
 ip flow ingress
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
 no keepalive
! 
interface FastEthernet2
    description DMZ
     ip address i.i.i.i 255.255.255.0
     ip access-group DMZ_IN in
     no ip unreachables
     ip flow ingress
     ip nat inside
     ip inspect firewall out
     ip virtual-reassembly

在接口 FE2 中是被 natted 的 Web 服务器。FE0 是我的 Provider 的传出接口。FE1 是我的内部网络,每个客户端都连接到这里。

使用他的 iii100 - IP 从内部接口访问 DMZ 中的 Web 服务器没有问题。但我无法通过他的外部 IP xxx100 访问他。当您在我的网络外部时(例如您尝试连接手机),您可以联系到他。

有趣的是,我可以 ping 他的外部 IP,但如果我想在 Firefox 中导航到这个 IP,连接将被拒绝。

DNS 没有问题,因为我想用他的 IP 联系到他。如果我导航到他的内部 IP,没问题。

我需要解决这个问题,因为如果您连接到 VPN,您将无法再访问它,因为来自 VPN 的 DNS 会将您连接到外部 IP。这是第一次认识到这种行为。

大编辑:我没有配置这个路由器,它是其他人无法再访问了。所以我必须弄清楚在这个上所做的一切。

0个回答
没有发现任何回复~