Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2006 17:48:50 -0600 (CST)
From:      "Jeremy C. Reed" <reed@reedmedia.net>
To:        Larkine <larkine@gmail.com>
Cc:        freebsd-pf@freebsd.org
Subject:   Re: ftp-proxy or pftpx problem with FreeBSD 6.1
Message-ID:  <Pine.NEB.4.64.0611021733450.1699@glacier.reedmedia.net>
In-Reply-To: <454A7B1B.5090008@gmail.com>
References:  <454A7B1B.5090008@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> ### First method with ftp-proxy.
> 
> # rc.conf
> 
> i added these lines:
> 
> inetd_enable="YES"
> inetd_flags="-wW -c 60 -a 127.0.0.1"
> 
> # inetd.conf
> 
> I have this line:
> 
> ftp-proxy  stream  tcp  nowait  root  /usr/libexec/ftp-proxy ftp-proxy
> 
> After a reboot and with sockstat -4 command i have:
> 
> root  inetd  583  5  tcp4  127.0.0.1:8021
> 
> # pf.conf
> 
> nat-anchor "ftp-proxy/*"
> rdr-anchor "ftp-proxy/*"
> rdr pass on $int_inf proto tcp from any to any port 21 -> 127.0.0.1 port
> 8021
> 
> anchor "ftp-proxy/*"
> pass out proto tcp from $int_inf to any port 21 keep state

What version of ftp-proxy are you using?

The ftp-proxy with FreeBSD 6.x doesn't use PF anchors.

> Well, after i used ftp command the connexion works fine but with ls command
> i have this:
> 
> ftp>ls
> 229 Entering Extended Passive Mode (|||9576|)
> 200 EPRT command successful Consider using EPSV.
> 
> and  after 40 seconds i have this:
> 150 Here comes the directory listing.
> ftp: poll timeout waiting before accept: Operation not permitted
> 426 Failure writing network stream.
> 225 No transfer to ABOR.
> ftp>
> 
> I don't what happend but i think, the rdr don't work but why ? I don't know.

What is your entire pf.conf?

Have a look at your ftp-proxy manual page. You need to also allow the 
connections inbound. The man page has a two examples of this and mentions 
-u and -m and -M ftp-proxy options.

As for your pftpx tests, use pfctl to show the rules for your "pftpx" 
anchor. Maybe that will tell you something.

<advertisement>ISBN 0-9790342-0-5</advertisement>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.4.64.0611021733450.1699>