Hi there,
ich have a problem regarding ftp.proxy config.
Im using an perl script as "acp" for user authentication.
------------------------------------------------------------------------
#!/usr/bin/perl -w
$ENV{PATH} = "/bin:/usr/bin:/sbin:/usr/sbin";
if(!defined($ENV{PROXY_USERNAME}) or !defined($ENV{PROXY_PASSWD})) {
print STDERR "Please set the environment variables PROXY_USERNAME &
PROXY_PASSWD\n";
exit(1);
}
$PROXY_USERNAME = $ENV{PROXY_USERNAME};
$PROXY_PASSWD = $ENV{PROXY_PASSWD};
@pass = getpwnam("$PROXY_USERNAME");
if(!defined($pass[0])) {
print STDERR "Authentication failure...\n";
exit(1);
}
$passwd = $pass[1];
$salt = substr($passwd,0,2);
$mypass = crypt($PROXY_PASSWD,$salt);
$LOG = "/tmp/FTP_PROXY_LOG";
open(LKFD,">>$LOG") || die "Cannot open $LOG: $!";
flock(LKFD,2) || die "Cannot lock: $!";
seek(LKFD,0,2);
$date = `date`;
chomp($date);
$ts = time();
$date = `date "+%h-%d-%H:%M:%S"`;
chomp($date);
if($mypass ne $passwd) {
print STDERR "Authentication failure...\n";
print LKFD "$ts $date Authentication Failure For User
($PROXY_USERNAME)\n";
close(LKFD);
exit(1);
}
print STDERR "Success....\n";
print LKFD "$ts $date Authentication Succeeded For User
($PROXY_USERNAME)\n";
close(LKFD);
exit(0);
-----------------------------------------------------------------------------
So far so good.
When i try to connect with an ftp client to authenticate i get:
>>> CLI: 331 password required
>>> CLI: 500 service unavailable
proxy.conf
----------------------------------------------
bind 21
[172.18.64.5]
allow-anyremote yes
allow-blanks yes
allow-passwdblanks yes
debug yes
selectserver yes
extra-logging yes
acp /usr/local/etc/acp.rc
ccp /usr/local/etc/ccp.rc
Syslog messages:
ftp.proxy[25444]: connected to client: 172.18.104.14, interface=
172.18.64.5:21
ftp.proxy[25444]: info: monitor mode: off, ccp: /usr/local/etc/ccp.rc
ftp.proxy[25444]: -ERR: missing hostname
Start commandline:
ftp.proxy -l -y -f /usr/local/etc/proxy.conf 172.18.64.5
Any hints?
Frank
--
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
--general-l------------------------------------
To unsubscribe please visit:
http://www.ftpproxy.org/html/maillinglists.html