Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82259

Re: Ftplib.FTP_TLS Ports

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'explicitly': 0.05; '22,': 0.09; 'connect,': 0.09; 'instance.': 0.09; 'latter': 0.09; 'rfc': 0.09; 'works.': 0.09; 'cc:addr:python-list': 0.11; 'windows': 0.15; '(without': 0.16; 'backward': 0.16; 'firewalls,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ftp,': 0.16; 'mode,': 0.16; 'numbered': 0.16; 'port,': 0.16; 'traverse': 0.16; '(you': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'basically': 0.19; 'connects': 0.19; 'slightly': 0.19; '(the': 0.22; 'cc:addr:python.org': 0.22; 'sends': 0.24; 'cc:2**0': 0.24; 'second': 0.26; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'host': 0.29; 'dec': 0.30; 'mode': 0.30; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; 'getting': 0.31; 'easier': 0.31; 'usually': 0.31; 'requesting': 0.31; 'open': 0.33; 'running': 0.33; 'skip:d 20': 0.34; "can't": 0.35; 'usual': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'being': 0.38; 'server': 0.38; 'pm,': 0.38; 'itself': 0.39; 'supporting': 0.39; 'either': 0.39; 'how': 0.40; 'days': 0.60; 'tell': 0.60; 'details.': 0.61; 'range': 0.61; 'high': 0.63; 'more': 0.64; 'details': 0.65; 'home': 0.69; 'default': 0.69; 'client-side': 0.84; 'interaction.': 0.84; 'listens': 0.84; 'protocol,': 0.84; 'subject:skip:F 10': 0.84; 'passive': 0.91; 'to:none': 0.92; 'ports': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=UE6A+m8ekCbbiA2bw2yc3lmDPlm4P7jA5p6apYrn43c=; b=UKXcno9LVunKho3yulkA3e9Vrh90cPU+4BSnKb/yhJdH/Qjy0HuRW3GXPExys+kS0v xHlA5STPbSFHPtxfhdcDlU5Yc0QZpM3GK5ugt3JjfgLU/WdfjXzEtU5iTG6TGb2xHrpD aswSFndZpF13W3WytpmCAgHdGnTEhr/xgcC/Kh+nDyU02x2lP+mEyRZ6SOCJbhRq4Q/Y HpK15EB2GaMfRFsjEe3WnllH6JVsl/7zZfIEJtaJkYJLKPxf5K9zFqf7zTNah0NgXdax Bg2q8BdxY9gUF5F09oh3099RI1ZzrKUWNoWrA5rtdPy8SuSmdZVIvGNkQvz7MfInuyB3 B2Aw==
MIME-Version 1.0
X-Received by 10.107.7.94 with SMTP id 91mr2019451ioh.27.1418186961711; Tue, 09 Dec 2014 20:49:21 -0800 (PST)
In-Reply-To <5bjf8a99aer9sv84f9e7tqp1t1mevqutb5@4ax.com>
References <CABDNQGxnL0Dh6oefU174bN6u59UK3XAKWLFpiKvYfN3VH8qaYA@mail.gmail.com> <5bjf8a99aer9sv84f9e7tqp1t1mevqutb5@4ax.com>
Date Wed, 10 Dec 2014 15:49:21 +1100
Subject Re: Ftplib.FTP_TLS Ports
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16792.1418186970.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418186970 news.xs4all.nl 2958 [2001:888:2000:d::a6]:56887
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82259

Show key headers only | View raw


On Wed, Dec 10, 2014 at 3:37 PM, Dennis Lee Bieber
<wlfraed@ix.netcom.com> wrote:
>         Are you running in PASSIVE mode?
>
>         Original (normal?) FTP uses the known numbered port as a control port,
> and gets a second port for the data itself (without looking up the RFC I
> can't state if said second port is opened by the server in response to the
> client connect, or is provided to the server by the client).
>
>         Passive mode, as I understand it, basically means the control port is
> used for everything -- it explicitly is used to get through firewalls.

Passive mode is easier for getting through firewalls, especially at
the client side, but that's not exactly how it works.

In active mode (the default for the protocol, though a lot of clients
these days default to requesting passive mode), the FTP client listens
on a port and the FTP server connects to that port for data
transmission - inverting the usual server/client interaction. The
client can either listen on port 22, or listen on any other port and
send the server the details (the latter being much more common).

In passive mode, the server listens on an additional port, and sends
the client the details. The client then connects to that port, usually
on the same host as the control port, but a high number.

Passive mode is much easier for a client-side firewall; it can usually
traverse a defaultly-configured home grade NAT firewall, for instance.
Active mode is slightly easier for a server-side firewall, though the
difference isn't huge (you just have to open up an additional port
range and tell the FTP server which ports to use). If it weren't for a
few mindbogglingly backward clients like the default Windows FTP,
there'd be virtually no reason to bother supporting active mode any
more.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Ftplib.FTP_TLS Ports Chris Angelico <rosuav@gmail.com> - 2014-12-10 15:49 +1100

csiph-web