Article delegate-en/2745 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A2744@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: FTP auth without @host suffix
09 Sep 2004 18:43:11 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


In message <_A2744@delegate-en.ML_> on 09/09/04(18:28:31)
you Oliver Pabst <pxafabdyi-6cvkctfjurnr.ml@ml.delegate.org> wrote:
 |I try to use delegate as a FTP proxy.
 |
 |The original FTP server runs @127.0.0.1 on port 8021 and delegate must
 |listen @0.0.0.0 on port 21.
 |
 |I start delegate as follows:
 |
 |delegated -v -f -P21 SERVER=ftp://127.0.0.1:8021/ \
 |                MOUNT="/* ftp://127.0.0.1:8021/path/Data/*" \
 |                2>&1
 |
 |I want delegate to forward requests to the internal FTP server, by
 |translating the path. 
 |
 |So 0.0.0.0:21/a/* will be translated to 127.0.0.1:8021/path/Data/a/*
 |
 |My problem is that the client MUST login by using the
 |user@127.0.0.1:8021 form, and that the requests are not translated.

I tested it with DeleGate/8.9.6 on my Linux machine (RH7.1) to see it
works without problem as follows:

[proxy-server]

  % delegated -v -P9999 SERVER=ftp MOUNT="/* ftp://localhost/Desktop/*"

[ftp-cleint]

  % ftp `hostname` 9999
  Connected to myhost
  220- myhost PROXY-FTP server (DeleGate/8.9.6-pre19) ready.
  220-   @ @
  220-  ( - ) { DeleGate/8.9.6-pre19 (September 9, 2004) }
  ...
  220  
  
  Name: myname   
  331 Password required for myname.
  
  Password:
  230- User myname logged in.
  230  Now you can select a FTP SERVER by cd //SERVER
  
  ftp> ls
  227 Entering Passive Mode (192,168,x,xxx,199,161).
  150-- LIST for myname@localhost..
  220- myhost FTP server (Version wu-2.6.1-16) ready.
  331- Password required for myname.
  ...
  230-
  230- User myname logged in.
  150- Opening ASCII mode data connection for directory listing.
  150--  @ @  
  150  \( - )/ -- { connected to `localhost' }
  total 72
  drwxr-xr-x   2 500      500          4096 Mar 26  2001 Autostart
  -rw-r--r--   1 500      500           230 Mar 26  2001 Printer.kdelnk
  ...
  226 Transfer complete.

The LOGFILE for the session is like this:

  09/10 03:38:08.98 [13562] 1+0: -- Fork(OnetimeServer): 13529 -> 13562
  09/10 03:38:08.98 [13562] 1+0: (0) accepted [17] -@[192.168.x.xxx]myhost:51103 (0.004s)(1)
  09/10 03:38:08.99 [13562] 1+0: PATH: ftp://-:21!myhost:9999!myhost:51103!anonymous@myhost;1094755088
  09/10 03:38:09.00 [13562] 1+0: FTP server ftp://-:21/
  09/10 03:38:09.00 [13562] 1+0: *** / => ftp://localhost/Desktop/ ***
  09/10 03:38:09.00 [13562] 1+0: MOUNTED-TO: //localhost/Desktop/
  09/10 03:38:09.00 [13562] 1+0: bind_insock(14,192.168.x.xxx,0) = 0, errno=0
  09/10 03:38:09.01 [13562] 1+0: ## connect[14] TIMEOUT(1000)
  09/10 03:38:09.01 [13562] 1+0: ### IDENT CONNECT(myhost:113) TIMEOUT(1000ms) (110)
  09/10 03:38:09.01 [13562] 1+0: #### no authorization required
  09/10 03:38:14.40 [13562] 1+0: FTP-control-remote: 192.168.x.xxx:9999
  09/10 03:38:14.40 [13562] 1+0: FTP-data-local[15]: 192.168.x.xxx:51105
  09/10 03:38:14.40 [13562] 1+0: PASV [X][192,168,x.xxx,199,161] >> 227 Entering Passive Mode (192,168,x.xxx,199,161).^M
  09/10 03:38:14.40 [13562] 1+0: *** / => ftp://localhost/Desktop/ ***
  09/10 03:38:14.40 [13562] 1+0: MOUNTED REMOTE [myname@localhost:21] LIST Desktop/
  09/10 03:38:14.41 [13562] 1+0: FTP LOGIN FROM myhost TO myname@localhost
  09/10 03:38:14.41 [13562] 1+0: PATH: ftp://localhost:21!myhost:9999!myhost:51103!anonymous@myhost;1094755088
  09/10 03:38:14.42 [13562] 1+0: FTP server ftp://localhost:21/
  09/10 03:38:14.42 [13562] 1+0: FTPHOPS: 1 [8/17 - -1/-1]
  09/10 03:38:14.42 [13562] 1+0: ConnectToServer: DFLT=ftp://localhost:21 REAL=://:0
  09/10 03:38:14.43 [13562] 1+0: ConnectToServer connected [16] {127.0.0.1:21 <- 127.0.0.1:51107} [0.004s]
  09/10 03:38:14.51 [13562] 1+0: LoginPWD: "/home/myname"
  09/10 03:38:14.52 [13562] 1+0: ftp_conndata: connected 127.0.0.1:51106->localhost/127.0.0.1:20346 [18]
  09/10 03:38:14.52 [13562] 1+0: -- with PASV
  09/10 03:38:14.52 [13562] 1+0: PASV [B][InheritingFromUnboundProxyMode] >> 227 Entering Passive Mode (InheritingFromUnboundProxyMode).^M
  09/10 03:38:14.52 [13562] 1+0: *** / => ftp://localhost/Desktop/ ***
  09/10 03:38:14.52 [13562] 1+0: FTP-CACHE: LIST [Desktop/] = [][]:0
  09/10 03:38:14.52 [13562] 1+0: DATA 127.0.0.1:20346 -> 127.0.0.1:51106 .. 192.168.x.xxx:51105 -> 192.168.x.xxx:51106
  09/10 03:38:14.56 [13562] 1+0: FTP data-relay([18]10000b -> [19]10000b) 649b / 1/ 0.04s (read-EOF)
  09/10 03:38:14.56 [13562] 1+0: *** / => ftp://localhost/Desktop/ ***
  09/10 03:38:14.56 [13562] 1+0: restoreCWD(3) -- TO SAME HOST[Desktop](ftp://myname@localhost/Desktop/)[]

Cheers,
Yutaka
--
  D G   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( - )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V