登录 | 首页 -> 华新鲜事 -> 社会百科 | 切换到:传统版 / sForum | 树形列表
===在NTU设置FTP遇到的IP问题===
<<始页  [1]  末页>> 

===在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,外面的可以进,但是不可以看见任何文件,请指教。
[问题少年 (10-14 13:04, Long long ago)] [ 传统版 | sForum ][登录后回复]1楼

另一个问题是,为什么两个方法得到的ip不一样[问题少年 (10-14 13:51, Long long ago)] [ 传统版 | sForum ][登录后回复]2楼

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.
[SmellsLikeTeenSpirit (10-14 14:21, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼

(引用 问题少年:另一个问题是,为什么两个方法得到的ip不一样)that shouldn't be the casemaybe you can copy and paste the conflicting results here[SmellsLikeTeenSpirit (10-14 14:22, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼

(引用 SmellsLikeTeenSpirit: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
[问题少年 (10-14 14:53, Long long ago)] [ 传统版 | sForum ][登录后回复]5楼

(引用 SmellsLikeTeenSpirit:need to take careof firewall traversal problems. a set of issues relating to active and passive server mode will have to be th...)But how?how can i replicate the settings used by FTP admins?[问题少年 (10-14 14:54, Long long ago)] [ 传统版 | sForum ][登录后回复]6楼

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 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.
[香陵居士 (10-14 14:59, Long long ago)] [ 传统版 | sForum ][登录后回复]7楼

(引用 香陵居士:This is related to NATAccording to Internet Assigned Numbers Authority(IANA), three blocks of addresses are for private IP addre...)I tried to set it to PASV modebut it becomes not accessable even from my own computer....

Don't know why.

But any way, thanks for ur good explanation to NAT
[问题少年 (10-14 15:20, Long long ago)] [ 传统版 | sForum ][登录后回复]8楼

终于搞定了,经验如下1。由于NAT的关系,要让外部能进入你的ftp的话,必须新开一个domain,在enable PASV mode里面输入你的public ip address.

2。对于NTU内部共享,必须disable PASV mode.
[问题少年 (10-14 15:34, Long long ago)] [ 传统版 | sForum ][登录后回复]9楼


<<始页  [1]  末页>> 
登录 | 首页 -> 华新鲜事 -> 社会百科 | [刷新本页] | 切换到:传统版 / sForum