From owner-freebsd-questions@FreeBSD.ORG Tue May 28 04:40:34 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BF936EBD for ; Tue, 28 May 2013 04:40:34 +0000 (UTC) (envelope-from me@staticsafe.ca) Received: from uriel.asininetech.com (uriel.asininetech.com [IPv6:2607:5300:60:e3a::1]) by mx1.freebsd.org (Postfix) with ESMTP id 700897A7 for ; Tue, 28 May 2013 04:40:34 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by uriel.asininetech.com (Postfix) with ESMTP id 75385E09E5; Tue, 28 May 2013 00:40:26 -0400 (EDT) X-DKIM: OpenDKIM Filter v2.6.8 uriel.asininetech.com 75385E09E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=staticsafe.ca; s=2012; t=1369716026; bh=iFLqSLOHVVLVMeg87n3wakiiLZh2HADwfqjw58bEyWQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=wYdEOBXeOQWnhIVINqf9626O4naKfqDvYqJD4sced/m7q9h6/0K8sGA+ui82Ki1zX y0gPnZZJUN1tDcZnaGRZ3iA0T1CLUHaX0bXeWvmLbeLhDblCwqH2zQxy2I8f3jEb4f pi8scIHDqc66/Zv+PDuk/zKBYjkHalptbSpsUoRw= Received: from uriel.asininetech.com ([127.0.0.1]) by localhost (uriel.asininetech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GVir_7zaqkCw; Tue, 28 May 2013 00:40:25 -0400 (EDT) Received: from uriel.asininetech.com (uriel.asininetech.com [IPv6:2607:5300:60:e3a::1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by uriel.asininetech.com (Postfix) with ESMTPSA id BFB07E0620; Tue, 28 May 2013 00:40:25 -0400 (EDT) X-DKIM: OpenDKIM Filter v2.6.8 uriel.asininetech.com BFB07E0620 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=staticsafe.ca; s=2012; t=1369716025; bh=iFLqSLOHVVLVMeg87n3wakiiLZh2HADwfqjw58bEyWQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Najh0vgpUBpNzitM0RS+MHA/LdwBzSEc9zes/G6PxtrbGXDm3PMzXLUnFySRnDjUm XpXxMaUvwjFAJ8QXTH9sRqueBiz3P87iVEEWFen1XdXzQzxz041GTD5yTj/C5iIkl5 hC/OHbiefVUKyaj/jwTTg+pa/44XMlLmDusmQnvQ= Date: Tue, 28 May 2013 00:40:23 -0400 From: staticsafe To: freebsd-questions@freebsd.org Subject: Re: cannot use ftp utility throught proxy Message-ID: <20130528044022.GA22271@uriel.asininetech.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: vadims@libre.lv X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 04:40:34 -0000 On Tue, May 28, 2013 at 07:08:12AM +0300, vadims@libre.lv wrote: > Hello! > Can someone help me, please? > > Have no luck seting up ftp utility for using proxy. > Already have set environment variables: > FTP_PROXY=http://proxyserver:8080 > HTTP_PROXY=http://proxyserver:8080 > > When try to connect: > root# root@zerver:/root # ftp -a ftp2.FreeBSD.org > root# ftp: Can't connect to `128.205.32.24:21': Operation timed out > root# ftp: Can't connect to `ftp2.FreeBSD.org:ftp' > > Used tcpdump to check where it connects: > root# tcpdump -n -ttt -i em0 port ftp > > & I can see, that ftp is trying to connect directly to 128.205.32.24.21. > > Tried to use this env variable, but without acceptable results: > FETCH_CMD=/usr/bin/fetch -ARrvp -T 10 > > uname -a > 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC > 2013 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC > amd64 > > Excuses my language, not native English. > > Have a lucky day! > VS. According to the ftp manpage, the variables for proxying are: ftp_proxy URL of FTP proxy to use when making FTP URL requests (if not defined, use the standard FTP protocol). See http_proxy for further notes about proxy use. http_proxy URL of HTTP proxy to use when making HTTP URL requests. If proxy authentication is required and there is a user- name and password in this URL, they will automatically be used in the first attempt to authenticate to the proxy. If ``unsafe'' URL characters are required in the username or password (for example `@' or `/'), encode them with RFC3986 `%XX' encoding. Note that the use of a username and password in ftp_proxy and http_proxy may be incompatible with other programs that use it (such as lynx(1)). NOTE: this is not used for interactive sessions, only for command-line fetches. Notice the capitalization, "ftp_proxy" as opposed to "FTP_PROXY". Not sure why environment variables are not all caps, seems inconsistent. -- staticsafe O< ascii ribbon campaign - stop html mail - www.asciiribbon.org Please don't top post - http://goo.gl/YrmAb Don't CC me! I'm subscribed to whatever list I just posted on.