===在NTU设置FTP遇到的IP问题===
登录 | 论坛导航 -> 华新鲜事 -> 社会百科 | 本帖共有 9 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:问题少年 (等级:2 - 初出茅庐,发帖:193) 发表:2003-10-14 13:04:01  楼主  关注此帖
===在NTU设置FTP遇到的IP问题===
俺刚刚在NTU搞了一个FTP,用ipconfig命令得到俺机器的ip是:172.20.192.xxx.
用这个ip,NTU内部的人可以连上FTP,外面的不可以。

为了让校外的也能联上,俺照TEENSPIRIT讲过的办法,去FTP.SINGNET.COM.SG,发现自己的public ip address是:155.69.189.xxx. 俺去no-ip.com申请了一个redirect, 它也自动detect到我的ip是155.69.189.xxx。

现在的问题是,用这个public ip,外面的可以进,但是不可以看见任何文件,请指教。
Put your OWN COOL signature here!
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:问题少年 (等级:2 - 初出茅庐,发帖:193) 发表:2003-10-14 13:51:17  2楼
另一个问题是,为什么两个方法得到的ip不一样
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:SmellsLikeTeenSpirit (等级:11 - 出神入化,发帖:6371) 发表:2003-10-14 14:21:58  3楼
need to take care
of firewall traversal problems.

a set of issues relating to active and passive server mode will have to be thoroughly understood and resolved.

alternatively, you can replicate the settings used by FTP admins in similar situation.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:SmellsLikeTeenSpirit (等级:11 - 出神入化,发帖:6371) 发表:2003-10-14 14:22:37  4楼
另一个问题是,为什么两个方法得到的ip不一样
that shouldn't be the case
maybe you can copy and paste the conflicting results here
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:问题少年 (等级:2 - 初出茅庐,发帖:193) 发表:2003-10-14 14:53:24  5楼
that shouldn't be the casemaybe you can copy and paste the conflicting results here
here
=========ipconfig:=============
connection-specific DNS Suffix: ntu.edu.sg
IP Address : 172.20.192.xxx
Subnet Mask : 255.255.252.0
Default Gateway : 172.20.195.254


=========ftp to ftp.singnet.com.sg=========

Tue Oct 14 14:53:15 2003 Connecting ftp.singnet.com.sg:21
Tue Oct 14 14:53:15 2003 Connecting ftp.singnet.com.sg [IP=165.21.8.86:21]
Tue Oct 14 14:53:15 2003 Socket connected, Waiting for welcome message.
Tue Oct 14 14:53:25 2003 220 WELCOME TO SINGNET'S FTP SERVER
Tue Oct 14 14:53:25 2003 USER anonymous
Tue Oct 14 14:53:25 2003 331 Anonymous login ok, send your complete email address as your password.
Tue Oct 14 14:53:25 2003 PASS ********
Tue Oct 14 14:53:25 2003 230-
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003 W E L C O M E T O S I N G N E T ' S F T P S E R V E R
Tue Oct 14 14:53:25 2003 *************************************************************
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003 You are now connected to SingNet's public FTP archives.
Tue Oct 14 14:53:25 2003 All transfers to and from archive are logged.If you do not like
Tue Oct 14 14:53:25 2003 this policy, please disconnect now.
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003 Archive user name : anonymous IP Address : 155.69.189.89
Tue Oct 14 14:53:25 2003 Local Time is: Tue Oct 14 15:09:37 2003
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003 You are connection NO. 6 user of total 200 users allowed.
Tue Oct 14 14:53:25 2003 If you have any unusual problems, please report to via email
Tue Oct 14 14:53:25 2003 to <help@singnet.com.sg>.Thanks You !
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003 You will find lots of files on this FTP server for different systems,
Tue Oct 14 14:53:25 2003 and various other archives. SingNet has mirrored a lot of software
Tue Oct 14 14:53:25 2003 (freeware, shareware & Open Source) to provide faster downloading time
Tue Oct 14 14:53:25 2003 for local users. Enjoy FTP-ing!
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003
Tue Oct 14 14:53:25 2003 230 Anonymous access granted, restrictions apply.
Tue Oct 14 14:53:25 2003 Login Successful
Tue Oct 14 14:53:25 2003 REST 100
Tue Oct 14 14:53:25 2003 350 Restarting at 100. Send STORE or RETRIEVE to initiate transfer.
Tue Oct 14 14:53:25 2003 This site can resume broken downloads.
Tue Oct 14 14:53:25 2003 REST 0
Tue Oct 14 14:53:25 2003 350 Restarting at 0. Send STORE or RETRIEVE to initiate transfer.
Tue Oct 14 14:53:25 2003 PWD
Tue Oct 14 14:53:25 2003 257 "/" is current directory.
Tue Oct 14 14:53:25 2003 TYPE A
Tue Oct 14 14:53:25 2003 200 Type set to A.
Tue Oct 14 14:53:25 2003 PASV
Tue Oct 14 14:53:25 2003 227 Entering Passive Mode (165,21,8,86,228,71).
Tue Oct 14 14:53:25 2003 LIST -la
Tue Oct 14 14:53:25 2003 150 Opening ASCII mode data connection for file list
Tue Oct 14 14:53:25 2003 226 Transfer complete.
Tue Oct 14 14:53:25 2003 drwxr-xr-x 7 guest guest 512 Feb 9 2002 .
Tue Oct 14 14:53:25 2003 drwxr-xr-x 7 guest guest 512 Feb 9 2002 ..
Tue Oct 14 14:53:25 2003 drwxr-xr-x 5 root root 512 Jul 10 2002 browsers
Tue Oct 14 14:53:25 2003 drwxr-xr-x 2 root root 512 Jul 4 02:27 misc
Tue Oct 14 14:53:25 2003 drwxr-xr-x 9 root root 512 Jan 19 2003 opensource
Tue Oct 14 14:53:25 2003 drwxr-xr-x 8 adm adm 512 Aug 1 2002 pub
Tue Oct 14 14:53:25 2003 drwxr-xr-x 2 root root 512 Oct 2 2002 support
Tue Oct 14 14:53:25 2003 -rw-r--r-- 1 root root 816 Oct 8 2001 welcome.msg
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:问题少年 (等级:2 - 初出茅庐,发帖:193) 发表:2003-10-14 14:54:32  6楼
need to take careof firewall traversal problems. a set of issues relating to active and passive server mode will have to be thoroughly understood and resolved. alternatively, you can replicate the settings used by FTP admins in similar situation.
But how?
how can i replicate the settings used by FTP admins?
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:香陵居士 (等级:16 - 好恐怖呀,发帖:22662) 发表:2003-10-14 14:59:21  7楼
This is related to NAT
According to Internet Assigned Numbers Authority(IANA), three blocks of addresses are for private IP addressing, they are:

10.0.0.0/8
172.16.0.0/12 (Your IP address belongs to this group)
192.168.0.0/16

These IP addresses are usually not supported outside your LAN. This problem is usually solved by Network Address Translation (NAT) or Port Address Translation (PAT). NAT or PAT in short can be explained as a method to translate your local IP to a global IP which is recognizable outside LAN.

So what you see through ipconfig /all (172.20.192.xxx) is you local IP, which is a private IP and is not recognized in WAN (Thats why people outside NTU can not visit you);
the IP you see through FTP.SINGNET.COM.SG is "your" global IP, which is public and it is recognized in WAN. It is translated from your local IP by the router connecting outside automatically.

But NAT have its own problems: It add addtional delay; it prevents you from using peer-to-peer IP tracing tools; and it causes some problem with certain High-level Protocol/Applications.

One of the certain problem caused is PORT mode FTP transmisstion. As PORT mode use different port for control message and data, it will be stopped by NAT. Thus if your LAN is connecting outside using NAT, don't use PORT mode, use PASV mode instead.

To summary up:
1. The different address seen is caused by NAT and is nothing unnature.
2. Make sure to use PASV mode to access FTP through NAT.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:问题少年 (等级:2 - 初出茅庐,发帖:193) 发表:2003-10-14 15:20:02  8楼
This is related to NATAccording to Internet Assigned Numbers Authority(IANA), three blocks of addresses are for private IP addressing, they are: 10.0.0.0/8 172.16.0.0/12 (Your IP address belongs to this group) 192.168.0.0/16 These IP addresses are usually not supported outside your LAN. This problem is usually solved by Network Address Translation (NAT) or Port Address Translation (PAT). NAT or PAT in short can be explained as a method to translate your local IP to a global IP which is recognizable outside LAN. So what you see through ipconfig /all (172.20.192.xxx) is you local IP, which is a private IP and is not recognized in WAN (Thats why people outside NTU can not visit you); the IP you see through FTP.SINGNET.COM.SG is "your" global IP, which is public and it is recognized in WAN. It is translated from your local IP by the router connecting outside automatically. But NAT have its own problems: It add addtional delay; it prevents you from using peer-to-peer IP tracing tools; and it causes some pro (more...)
I tried to set it to PASV mode
but it becomes not accessable even from my own computer....

Don't know why.

But any way, thanks for ur good explanation to NAT
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:问题少年 (等级:2 - 初出茅庐,发帖:193) 发表:2003-10-14 15:34:01  9楼 评分:
终于搞定了,经验如下
1。由于NAT的关系,要让外部能进入你的ftp的话,必须新开一个domain,在enable PASV mode里面输入你的public ip address.

2。对于NTU内部共享,必须disable PASV mode.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
论坛导航 -> 华新鲜事 -> 社会百科 | 返回上一页 | 本主题共有 9 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码