Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2013 09:12:47 +0300 (EEST)
From:      vadims@libre.lv
To:        "Lawrence K. Chen, P.Eng." <lkchen@ksu.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: cannot ftp using proxy
Message-ID:  <alpine.BSF.2.00.1306040903100.2122@vbsd.libre.lv>
In-Reply-To: <823454234.22177113.1370298348163.JavaMail.root@k-state.edu>
References:  <823454234.22177113.1370298348163.JavaMail.root@k-state.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
I found that environment variables was set trought /etc/login.conf, like 
this:
root:\
         :ignorenologin:\
 	:setenv=http_proxy=http\c//myproxy\c8080,ftp_proxy=http\c//myproxy\c8080:\
         :tc=default:

After cutting "setenv" part in login.conf and setting proxy in .cshrc, 
I can "ftp" using proxy.

Thank you for help!
VS.

On Mon, 3 Jun 2013, Lawrence K. Chen, P.Eng. wrote:

> Delving through the source code...it appears that it only uses the ftp_proxy when given an ftp url
>
> something like:
>
>> ftp ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT
> Requesting ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT
>  (via www-proxy.ksu.edu:8080)
> 100% |***********************************|  3795       26.38 KiB/s    00:00 ETA
> 3795 bytes retrieved in 00:00 (26.36 KiB/s)
>
> Only the fetch side uses proxy (triggered by there being a ':' in the argument.)
>
> The interactive ftp side doesn't.
>
>
> ----- Original Message -----
>> Hello!
>> Still can't resolve problem with "ftp" utility.
>>
>> root@ona:/root # ftp ftp2.freebsd.org
>> ftp: Can't connect to `128.205.32.24:21': Operation timed out
>> ftp: Can't connect to `ftp2.freebsd.org:ftp'
>> ftp>
>>
>> "socksta -4" tells me that it is not even trying to connect to proxy
>> server, connecting directly instead:
>>
>> root@ona:/root # sockstat -4
>> USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN
>> ADDRESS
>> root     ftp        54160 3  tcp4   10.10.15.26:50457
>>     128.205.32.24:21
>>
>>
>> root@ona:/root # uname -a
>> FreeBSD ona.iem.gov.lv 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
>>
>>
>> root@ona:/root # env
>> TERM=screen
>> ftp_proxy=http://myproxy:8080
>> http_proxy=http://myproxy:8080
>> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
>> SHELL=/bin/csh
>> HOME=/root
>> USER=root
>> HOSTTYPE=FreeBSD
>> VENDOR=amd
>> OSTYPE=FreeBSD
>> MACHTYPE=x86_64
>> SHLVL=1
>> PWD=/root
>> LOGNAME=root
>> GROUP=wheel
>> HOST=ona
>> EDITOR=vi
>> PAGER=more
>> BLOCKSIZE=K
>>
>> Tried to google with no luck - no solution works for me. By the way,
>> "fetch" works as expected, I can fetch and install ports.
>> I would appreciate any help and/or any hints!
>>
>> Best regards!
>> VS.
>> _______________________________________________
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to
>> "freebsd-questions-unsubscribe@freebsd.org"
>>
>
> -- 
> Who: Lawrence K. Chen, P.Eng. - W0LKC - Senior Unix Systems Administrator
> For: Enterprise Server Technologies (EST) -- & SafeZone Ally
> Snail: Computing and Telecommunications Services (CTS)
> Kansas State University, 109 East Stadium, Manhattan, KS 66506-3102
> Phone: (785) 532-4916 - Fax: (785) 532-3515 - Email: lkchen@ksu.edu
> Web: http://www-personal.ksu.edu/~lkchen - Where: 11 Hale Library
>



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