内网通过公网IP访问不了内网的机器

发布时间:2024-05-19 11:23 发布:上海旅游网

问题描述:

----------
这样的情况,我从内网用公网的IP访问不了内网的机器(Nat做的没问题),,但是从外面可以访问。。比如。。有台192.168.0.100的机器。。上面有web服务。。我在路由器上作了端口映射,我从外面通过ip 211.101.20.70可以访问。。但是我从内网用IP 211.101.0.70却访问不了。。只能用192.168.0.100访问
因为192.168.0.100上放了个网站。。好多图片的链接是用的域名。。域名绑定的是公网IP 211.101.20.70
,而且网站我又改不了。。。所以想让内网也能用公网IP访问

下面是路由的配置:

-----------------

Building configuration...

Current configuration : 4081 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$GIds$QOn
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
no aaa new-model
ip subnet-zero
ip cef
!
!
!
no ip domain lookup
no ftp-server write-enable
!
!
!
!
interface Ethernet0
ip address 200.200.200.22 255.255.255.0 secondary
ip address 172.30.26.2 255.255.255.252
ip nat outside
half-duplex
!
interface FastEthernet0
ip address 192.168.0.1 255.255.255.0 secondary
ip address 211.101.20.65 255.255.255.240
ip nat inside
speed auto
!
interface Serial0
no ip address
shutdown
no fair-queue
!
ip nat pool jajx 211.101.20.78 211.101.20.78 netmask 255.255.255.240
ip nat inside source list 1 pool jajx overload
ip nat inside source static 192.168.0.100 211.101.20.70

ip classless
ip route 0.0.0.0 0.0.0.0 172.30.26.1
no ip http server
!
access-list 1 permit 192.168.0.0 0.0.0.255
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
password 7 1311120006050A2B2737
login
!
!
end

问题解答:

使用 nat dns-map 可以解决,以前做过,不过忘记了,具体怎么设置自己要研究研究,好了贴一个上来参考!互相学习!

当你开启了guest账户却还是根本不能访问时,请检查设置是否为拒绝guest从网络访问计算机,因为XP默认是不允许guest从网络登录的,所以即使开了guest也一样不能访问。在开启了系统Guest用户的情况下解除对Guest账号的限制,点击“开始→运行”,在“运行”对话框中输入“GPEDIT.MSC”,打开组策略编辑器,依次选择“计算机配置→Windows设置→安全设置→本地策略→用户权利指派”,双击“拒绝从网络访问这台计算机”策略,删除里面的“GUEST”账号。这样其他用户就能够用Guest账号通过网络访问使用Windows XP系统的计算机了。

热点新闻