Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jun 2000 21:07:27 -0600 (MDT)
From:      ken@kdm.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/19008: fetch -p doesn't use passive mode
Message-ID:  <200006050307.VAA33671@panzer.kdm.org>

next in thread | raw e-mail | index | archive | help

>Number:         19008
>Category:       bin
>Synopsis:       fetch -p doesn't use passive mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 04 20:10:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Kenneth D. Merry
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
KDM Enterprises
>Environment:

-current box as of about May 20th, 2000.

>Description:

fetch -p doesn't fetch files using passive mode ftp, although if you set
the FTP_PASSIVE_MODE variable to "yes", it will.

Using capital P instead of lower case p doesn't make any difference.  (The
code is the same in the fetch source anyway.)

>How-To-Repeat:

Configure a machine with a firewall that denies most incoming packets, or
even just incoming packets from port 20.

Try fetching a file with passive mode ftp, like this:

fetch -p ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT

Watch the firewall logs:

ipfw: 1040 Deny TCP 209.155.82.20:20 A.B.C.D:49159 in via de0
ipfw: 1040 Deny TCP 209.155.82.20:20 A.B.C.D:49159 in via de0
ipfw: 1040 Deny TCP 209.155.82.20:20 A.B.C.D:49159 in via de0
ipfw: 1040 Deny TCP 209.155.82.20:20 A.B.C.D:49159 in via de0

Obviously fetch used active mode instead of passive mode.  In passive mode,
the client connects to the server, not vice versa, as my firewall logs
show.

Interestingly enough, if you set FTP_PASSIVE_MODE to "yes", fetch will get
files in passive mode.

>Fix:

I don't have a fix.  I looked into this a little bit, and it looks like the
problem is likely somewhere in libftpio, but it wasn't obvious to me at
first glance what the problem is.

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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