LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2770|回复: 12

LAN内的一台机子绑定希网3322的动态域名,并在ADSL上做了端口转发。外网电脑ping不通

[复制链接]
发表于 2005-10-8 23:53:12 | 显示全部楼层 |阅读模式
标题说不大清楚,这里说清楚点。
RH8.0,安全设置:默认中级。ADSL是华硕的6000EV/G6,路由方式上网。申请的是****.3322.org的动态域名,telnet的23号端口绑定到局域网的一台机子(192.168.1.12)。在外网,想通过电脑telnet ****.3322.org,结果不成功。有关测试情况如下:
1、ping局域网其他机子
ping 192.168.1.2  结果:ping通
2、局域网其他机子ping这台电脑
ping 192.168.1.12 结果:ping通
3、局域网所有机子(包括本机)ping域名
ping ****.3322.org 结果:ping通
4、局域网内其他机子telnet
telnet ****.3322.org 结果:可以login
telnet 192.168.1.12 结果:可以login
5、ping外网
ping  www.163.com 结果:ping通
6、外网电脑ping ****.3322.org
显示:pinging ****.3322.org[192.168.1.12] with 32 bytes of  data:
......Desstination host unreachable
7、外网telnet本机
显示:在win下,是无法打开连接主机的23端口,连接失败;
在linux下,显示"telnet: Unable to connect to remote host: No route to host"

用的是3322的ez-ipupdate30分钟更新一次。ez-ipupdate的qdns.conf配置interface默认ppp0,但出错,改成eth0后就可以了。其他设置除了user,password,host等,按默认,没改。

不知什么原因?请提示一下。
发表于 2005-10-8 23:58:29 | 显示全部楼层
我的机器也在内网 需要作nat映射端口的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-9 00:05:01 | 显示全部楼层
Post by ltkun
我的机器也在内网 需要作nat映射端口的


上网没有问题,nat映射已按网络上有关华硕6000ev/g6的nat的资料做了相应设置。一个例子就是bt软件做了6881-6889端口的转发设置,netstat察看,设置应该没有问题。

以前在e-tek的adsl2018上做过内网建站,没有出现这个问题的。
回复 支持 反对

使用道具 举报

发表于 2005-10-9 00:19:54 | 显示全部楼层
域名绑定错误, 3322的动态域名应当绑定到 adsl 获取的外网IP上
回复 支持 反对

使用道具 举报

发表于 2005-10-9 00:39:19 | 显示全部楼层
我用的是debian自带的ez-update interface是eth1 如果不是自己pppoe拨号的话
ez-update只会让你选择接口不会让你选择绑定的IP呀 当然除非上网自己手动改

LZ你试试这样子 直接telnet你的外部IP看看行不行 不行的话就说明没有做好NAT
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-9 17:40:16 | 显示全部楼层
qdns.conf:

#!/usr/local/bin/ez-ipupdate -c
#
# example config file for ez-ipupdate
#
# this file is actually executable!
#

#下面动态域名和静态域名选一个

#动态域名
service-type=dyndns
#静态域名
#service-type=qdns-static

#设置用户名和密码
user=****:******

#你需要更新的域名
host=****.3322.org

#URL转向

#你的网络端口
interface=ppp1

#如果使用通配符,请将下面的注释去掉
#wildcard

#如果使用邮件服务器(mx)
#mx=mx.abc.com


max-interval=2073600

# please create this file and ensure that the user that ez-ipupdate is running
# as has write permissions to it then uncomment this line, if you don't your
# dyndns account will probably get banned. if you run ez-ipupdate as root (bad
# idea, use "run-as-user") then you can just uncomment this line.
#cache-file=/etc/ez-ipupdate.cache.eth1

# for the mean time we'll just use a cache file in the temp directory
cache-file=/tmp/ez-ipupdate.cache

# uncomment this once you have everything working how you want and you are
# ready to have ez-ipupdate running in the background all the time. to stop it
# you can use "killall -QUIT ez-ipupdate" under linux.
#daem

"ppp1"是我在adsl里看到的
-----------------------------------
#ez-ipupdate -c qdns.conf
ez-ipupdate Version 3.0.10
Copyright (C) 1999-2000 Angus Mackay.
ioctl(SIOCGIFADDR): No such device

我理解的是:只能绑定本机的ip,没办法获得adsl端的动态ip, 所以绑定不成功.
另外:adsl上的安全设置已全部取消,telnet外网电脑不成功.

adsl上的nat只有一条设置,是把adsl设为路由方式后自动生成的.
我家里的绑定3322域名只有这一条命令就成功,加入cron定时更新.lynx -mime_header -auth=user:password "http://www.3322.org/dyndns/update?system=dyndns&hostname=****.3322.org"
这台电脑没有这样做,是因为没有安装perl,而lynx必需要这个.下载安装很费时间.我就想知道题目的这个问题.
回复 支持 反对

使用道具 举报

发表于 2005-10-11 00:46:32 | 显示全部楼层
我也有碰到这样的问题。。。

就是 3322.org 的那个客户端程序获取的都是内网IP,而获不了外网IP,因此映射的
3322.org 域名都是内网的,害得每次猫重拨号之后我都要进入 www.3322.org 修改
新的 IP 地址,我的猫也是内置路由拨号,猫已经做了端口映射,不知道 linux 是否要做
什么操作?

请教各位高手。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-11 12:19:01 | 显示全部楼层
继续讨论
可能是3322的问题,而非本地机设置

我申请1i8动态域名后再试试
回复 支持 反对

使用道具 举报

发表于 2005-10-11 13:52:40 | 显示全部楼层
我用金万维的动态域名用的挺好的,你可登陆我的个人主页看看(http://firephoenix.gnway.net),已在上面作了openwebmail、ftp,还有论坛等,就是用POP3发信时有点问题,收信还行,我可以提供一个帐号给大家,帮我测试一下。用户名:super,password:3826395
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-11 22:24:48 | 显示全部楼层
Post by zj21cn
继续讨论
可能是3322的问题,而非本地机设置

我申请1i8动态域名后再试试


申请了www.1i8.com的动态域名,可以ping通
但在adsl上做了23,22端口转发,telnet,ssh还是不能上
过程如下;
[wlf@zj21cn root]$ ping ****.1i8.com
PING ****.1i8.com (*.*.*.*) from 192.168.1.2 : 56(84) bytes of data.
64 bytes from *.*.*.*: icmp_seq=1 ttl=117 time=520 ms
64 bytes from *.*.*.*: icmp_seq=2 ttl=117 time=527 ms
64 bytes from *.*.*.*: icmp_seq=3 ttl=117 time=517 ms
64 bytes from *.*.*.*: icmp_seq=4 ttl=117 time=519 ms
64 bytes from *.*.*.*: icmp_seq=5 ttl=117 time=523 ms
64 bytes from *.*.*.*: icmp_seq=6 ttl=117 time=530 ms
64 bytes from *.*.*.*: icmp_seq=7 ttl=117 time=527 ms

--- ****.1i8.com ping statistics ---
7 packets transmitted, 7 received, 0% loss, time 25135ms
rtt min/avg/max/mdev = 517.237/523.582/530.177/4.416 ms
[wlf@zj21cn root]$ telnet ****.1i8.com
Trying *.*.*.*...
Connected to ****.1i8.com (*.*.*.*).
Escape character is '^]'.
Connection closed by foreign host.
[wlf@zj21cn root]$ ssh ****.1i8.com
ssh: connect to address *.*.*.* port 22: Connection refused
[wlf@zj21cn root]$
回复 支持 反对

使用道具 举报

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

本版积分规则

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