woodheadz 发表于 12-10-2010 21:16:12

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

准备调试下将来打算放到网上的程序,需要配置个端口映射以能够从互联网上访问我的电脑。
应该很简单的东西,搞了半天还是没搞出来。:L
请懂的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就显示无法连接。
我的防火墙也是确认关了的。那么还会是什么原因?

ubuntuhk 发表于 12-10-2010 21:31:31

你的router设置了port forward了吗?

woodheadz 发表于 12-10-2010 21:39:44

原帖由 ubuntuhk 于 12-10-2010 21:31 发表 http://www.freeoz.org/ibbs/images/common/back.gif
你的router设置了port forward了吗?

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

felix100 发表于 12-10-2010 21:57:49

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

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

woodheadz 发表于 12-10-2010 22:10:38

原帖由 felix100 于 12-10-2010 21:57 发表 http://www.freeoz.org/ibbs/images/common/back.gif


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

coredump 发表于 12-10-2010 22:20:50

原帖由 woodheadz 于 12-10-2010 20:39 发表 http://www.freeoz.org/ibbs/images/common/back.gif


我的理解是我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.

woodheadz 发表于 12-10-2010 22:28:26

我的配置界面在这儿: fz就是我的端口映射配置


这个是我的rooter配置右侧菜单


[ 本帖最后由 woodheadz 于 12-10-2010 22:30 编辑 ]

woodheadz 发表于 12-10-2010 22:32:46

原帖由 coredump 于 12-10-2010 22:20 发表 http://www.freeoz.org/ibbs/images/common/back.gif


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:L

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

woodheadz 发表于 12-10-2010 22:37:06

原帖由 coredump 于 12-10-2010 22:20 发表 http://www.freeoz.org/ibbs/images/common/back.gif


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?

woodheadz 发表于 12-10-2010 22:52:28

搞定啦,原因和配置无关。是我干了件巨傻的事 :L :L
谢谢楼上各位帮忙!:lol :lol :good

coredump 发表于 12-10-2010 23:22:37

怎么傻法,说出来,让大家乐乐:lol

woodheadz 发表于 13-10-2010 01:23:28

原帖由 coredump 于 12-10-2010 23:22 发表 http://www.freeoz.org/ibbs/images/common/back.gif
怎么傻法,说出来,让大家乐乐:lol
不能说,不可说,太丢面子啦 :$ :L

Fernando 发表于 13-10-2010 08:02:43

IP地址映射错了?

coredump 发表于 13-10-2010 10:30:25

网线沒插;P

bg1pdq 发表于 17-10-2010 00:34:04

没插电源?;P

huazhb 发表于 18-10-2010 10:42:08

估计是需要重新启动一下了

woodheadz 发表于 18-10-2010 10:45:47

唉,因为我一直在尝试从内网用公网IP访问服务器。
后来换成用代理服务器一试就OK了:lol

coredump 发表于 18-10-2010 11:20:24

原帖由 woodheadz 于 18-10-2010 09:45 发表 http://www.freeoz.org/ibbs/images/common/back.gif
唉,因为我一直在尝试从内网用公网IP访问服务器。
后来换成用代理服务器一试就OK了:lol
你应该在网上贴地址,让大家试。:P
页: [1]
查看完整版本: 晕.. 一个简单的端口映射,咋就搞不定