找回密码
 FreeOZ用户注册
查看: 2264|回复: 17
打印 上一主题 下一主题

[其他] 晕.. 一个简单的端口映射,咋就搞不定

[复制链接]
跳转到指定楼层
1#
发表于 12-10-2010 20:16:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
准备调试下将来打算放到网上的程序,需要配置个端口映射以能够从互联网上访问我的电脑。
应该很简单的东西,搞了半天还是没搞出来。
请懂的TZ帮我看看是咋回事,我的NAT配置如下:
External Port(Start,end)        8000        9000
Protocol        TCP/UDP               
Internal Port(start, end)         8000        9000
Server IP Address        192.168.1.1
WAN Interface        ppp0
                  
192.168.1.1是我的服务器,服务在8080端口.
首先我从内网的其它机器访问192.168.1.1:8080是能够访问服务的,其次我通过外网IP访问我的router也是可以访问的。但通过外网IP:8080就显示无法连接。
我的防火墙也是确认关了的。那么还会是什么原因?
回复  

使用道具 举报

2#
发表于 12-10-2010 20:31:31 | 只看该作者
你的router设置了port forward了吗?

评分

参与人数 1威望 +20 收起 理由
woodheadz + 20 谢谢帮忙!

查看全部评分

回复  

使用道具 举报

3#
 楼主| 发表于 12-10-2010 20:39:44 | 只看该作者


我的理解是我NAT设置里面就包含了port forward, 不知道理解对不?
比如我现在的NAT设置就想把针对外网的8000-9000端口的访问map到内网192.168.1.1的8000-9000端口。
还有其它地方需要设置port forward吗?
回复  

使用道具 举报

4#
发表于 12-10-2010 20:57:49 | 只看该作者
原帖由 woodheadz 于 12-10-2010 21:16 发表
准备调试下将来打算放到网上的程序,需要配置个端口映射以能够从互联网上访问我的电脑。
应该很简单的东西,搞了半天还是没搞出来。
请懂的TZ帮我看看是咋回事,我的NAT配置如下:
External Port(Start,end) ...


你要确定你的服务商没有关闭这个端口。我以前也是试了很久,后来发现端口被封了。。

评分

参与人数 1威望 +20 收起 理由
woodheadz + 20 谢谢,我换个端口试试

查看全部评分

回复  

使用道具 举报

5#
 楼主| 发表于 12-10-2010 21:10:38 | 只看该作者
原帖由 felix100 于 12-10-2010 21:57 发表


你要确定你的服务商没有关闭这个端口。我以前也是试了很久,后来发现端口被封了。。

试了个9321端口,还是不行
回复  

使用道具 举报

6#
发表于 12-10-2010 21:20:50 | 只看该作者
原帖由 woodheadz 于 12-10-2010 20:39 发表


我的理解是我NAT设置里面就包含了port forward, 不知道理解对不?
比如我现在的NAT设置就想把针对外网的8000-9000端口的访问map到内网192.168.1.1的8000-9000端口。
还有其它地方需要设置port forward吗?


Post your configuration screenshot?

normally NAT is used for internal to external network address translation.
if you want to access your internal services from outside, you need to configure port forward or DMZ zones, etc.

they are different things.

评分

参与人数 1威望 +20 收起 理由
woodheadz + 20 谢谢帮忙!

查看全部评分

回复  

使用道具 举报

7#
 楼主| 发表于 12-10-2010 21:28:26 | 只看该作者
我的配置界面在这儿: fz就是我的端口映射配置
回复  

使用道具 举报

8#
 楼主| 发表于 12-10-2010 21:32:46 | 只看该作者
原帖由 coredump 于 12-10-2010 22:20 发表


Post your configuration screenshot?

normally NAT is used for internal to external network address translation.
if you want to access your internal services from outside, you need to configure ...


我一直以为NAT就是port forward

DMZ我也试验了下,没什么效果
回复  

使用道具 举报

9#
 楼主| 发表于 12-10-2010 21:37:06 | 只看该作者
原帖由 coredump 于 12-10-2010 22:20 发表


Post your configuration screenshot?

normally NAT is used for internal to external network address translation.
if you want to access your internal services from outside, you need to configure ...


这个是手册里的解释:
NAT
NAT (Network Address Translation) feature translates a private IP to a public IP, allowing multiple
users to access the Internet through a single IP account, sharing the single IP address. It is a natural
firewall for the private network.
Virtual Servers
In TCP/IP and UDP networks a port is a 16-bit number used to identify which application program
(usually a server) incoming connections should be delivered to. Some ports have numbers that are
pre-assigned to them by the IANA (the Internet Assigned Numbers Authority), and these are referred
to as “well-known ports”. Servers follow the well-known port assignments so clients can locate them.
If you wish to run a server on your network that can be accessed from the WAN (i.e. from other
machines on the Internet that are outside your local network), or any application that can accept
incoming connections (e.g. Peer-to-peer/P2P software such as instant messaging applications and
P2P file-sharing applications) and are using NAT (Network Address Translation), then you will
usually need to configure your router to forward these incoming connection attempts using specific
ports to the PC on your network running the application. You will also need to use port forwarding if
you want to host an online game server.
The reason for this is that when using NAT, your publicly accessible IP address will be used by and
point to your router, which then needs to deliver all traffic to the private IP addresses used by your
PCs. Please see the WAN configuration section of this manual for more information on NAT.
The device can be configured as a virtual server so that remote users accessing services such as
Web or FTP services via the public (WAN) IP address can be automatically redirected to local
servers in the LAN network
. Depending on the requested service (TCP/UDP port number), the
device redirects the external service request to the appropriate server within the LAN network.
This part is only available when NAT is enabled.

是不是可以理解为在我这个路由器上Nat 里面的virtual server 就是port forward?
回复  

使用道具 举报

10#
 楼主| 发表于 12-10-2010 21:52:28 | 只看该作者
搞定啦,原因和配置无关。是我干了件巨傻的事
谢谢楼上各位帮忙!
回复  

使用道具 举报

11#
发表于 12-10-2010 22:22:37 | 只看该作者
怎么傻法,说出来,让大家乐乐
回复  

使用道具 举报

12#
 楼主| 发表于 13-10-2010 00:23:28 | 只看该作者
原帖由 coredump 于 12-10-2010 23:22 发表
怎么傻法,说出来,让大家乐乐

不能说,不可说,太丢面子啦
回复  

使用道具 举报

13#
发表于 13-10-2010 07:02:43 | 只看该作者
IP地址映射错了?

评分

参与人数 1威望 +20 收起 理由
woodheadz + 20 和配置无关,纯粹自己傻了 ^___^b

查看全部评分

回复  

使用道具 举报

14#
发表于 13-10-2010 09:30:25 | 只看该作者
网线沒插
回复  

使用道具 举报

15#
发表于 16-10-2010 23:34:04 | 只看该作者
没插电源?
回复  

使用道具 举报

16#
发表于 18-10-2010 09:42:08 | 只看该作者
估计是需要重新启动一下了
回复  

使用道具 举报

17#
 楼主| 发表于 18-10-2010 09:45:47 | 只看该作者
唉,因为我一直在尝试从内网用公网IP访问服务器。
后来换成用代理服务器一试就OK了

评分

参与人数 1威望 +50 收起 理由
coredump + 50 haha,这个错误我也犯过。

查看全部评分

回复  

使用道具 举报

18#
发表于 18-10-2010 10:20:24 | 只看该作者
原帖由 woodheadz 于 18-10-2010 09:45 发表
唉,因为我一直在尝试从内网用公网IP访问服务器。
后来换成用代理服务器一试就OK了

你应该在网上贴地址,让大家试。[size=14.1667px]
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+10, 29-4-2024 08:33 , Processed in 0.063999 second(s), 36 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表