Re: cannot ftp using proxy

2013-06-04 Thread vadims
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/s00: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 COMMANDPID   FD PROTO  LOCAL ADDRESS FOREIGN
ADDRESS
root ftp54160 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
r...@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-unsubscr...@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: lkc...@ksu.edu
Web: http://www-personal.ksu.edu/~lkchen - Where: 11 Hale Library


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


cannot ftp using proxy

2013-06-01 Thread vadims

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 COMMANDPID   FD PROTO  LOCAL ADDRESS FOREIGN ADDRESS
root ftp54160 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 
r...@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-unsubscr...@freebsd.org


cannot use ftp utility throught proxy

2013-05-27 Thread vadims

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 
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


Excuses my language, not native English.

Have a lucky day!
VS.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cannot use ftp utility throught proxy

2013-05-27 Thread vadims

Tried ftp_proxy=http://proxyserver:8080; - no connection to proxy server.

root@:/root # env
TERM=screen
FTP_PROXY=http://proxyserver:8080
HTTP_PROXY=http://proxyserver: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=myserver
EDITOR=vi
PAGER=more
BLOCKSIZE=K
FETCH_CMD=/usr/bin/fetch -ARrvp -T 10
ftp_proxy=http://proxyserver:8080

Thank You!

VS.

On Tue, 28 May 2013, Polytropon wrote:


On Tue, 28 May 2013 07:08:12 +0300 (EEST), vad...@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.


I think I can see the problem. Please check man ftp for the
correct name of the environment variables. Unlike typical for
many other programs, those for ftp are written in lower case:

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 RFC
   1738 `%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.

You can also interactively set those (again, see man ftp for
more details).





--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org