setting proxy

Network related discussions (including general TCP/IP stuff, routing, etc).

setting proxy

Postby hirohitosan » 28 Jan 2009, 09:54

Hi there.
How can I set the proxy permanent?
I did this:
Code: Select all
# setenv http_proxy http://my.proxy.server:3128

but after logout or reboot I have to set it again
How can I set this permanent?

thanks
User avatar
hirohitosan
Member
 
Posts: 279
Joined: 24 Nov 2008, 11:52

Postby SirDice » 28 Jan 2009, 10:10

Add it to ~/.cshrc
User avatar
SirDice
Old Fart
 
Posts: 16196
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby Trojan » 29 Apr 2009, 16:17

FreeBSD runs squid and used as non-transparent proxy without any authentication. On another FreeBSD 6.3 machine in local network I added setenv http_proxy 192.168.100.1:3128 and setenv ftp_proxy 192.168.100.1:3128 in user/.cshrc and root/.cshrc. When I try to install any packet I get the next:

Code: Select all
WS137# setenv http_proxy 192.168.100.1:3128
WS137# setenv ftp_proxy 192.168.100.1:3128
WS137# pkg_add -r nano
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz: Protocol error
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz' by URL


Even adding these variables in command line does not solve the problem.

What can be the reason of it?
User avatar
Trojan
Junior Member
 
Posts: 25
Joined: 23 Feb 2009, 17:34
Location: Uzbekistan, Tashkent

Postby DutchDaemon » 29 Apr 2009, 21:37

You need to use
Code: Select all
http://192.168.100.1:3128/
not just ip address:port
User avatar
DutchDaemon
Old Fart
 
Posts: 10467
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby Trojan » 30 Apr 2009, 11:29

This method also doesn't work.

Code: Select all
WS137# setenv http_proxy http://192.168.100.1:3128 
WS137# setenv ftp_proxy http://192.168.100.1:3128 
WS137# pkg_add -r nano 
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz: Not Found 
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz' by URL


What I can try else?
User avatar
Trojan
Junior Member
 
Posts: 25
Joined: 23 Feb 2009, 17:34
Location: Uzbekistan, Tashkent

Postby DutchDaemon » 30 Apr 2009, 14:54

ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release does not exit. So your settings are probably correct, the directory just doesn't exist. You could try setting the PACKAGESITE environment variable ([man=1]pkg_add[/man]) to one of ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/ or ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.4-release/.

Code: Select all
The environment variable PACKAGESITE specifies an alternate location for
     pkg_add to fetch from.  This variable subverts the automatic directory
     logic that pkg_add uses when the -r option is invoked.  Thus it should be
     a complete URL to the remote package file(s).


This may or may not work. Both 6-stable and 6.4-release are newer than your OS, so your installed packages may require newer libraries. Upgrading the OS to 6.4 is recommended.
User avatar
DutchDaemon
Old Fart
 
Posts: 10467
Joined: 16 Nov 2008, 20:17
Location: The Netherlands


Return to Networking

Who is online

Users browsing this forum: Bing [Bot] and 0 guests