Setting up proxy

Oliver Fromme olli at lurza.secnetix.de
Fri Aug 18 14:08:18 UTC 2006


Viswas Nair <fysical at gmail.com> wrote:
 > I am trying to setup a FBSD 6.1 machine at work. I have an IP addressed by a
 > DHCP server. However, to connect to the internet I need to use a proxy. How
 > do I configure the system to connect via the proxy?
 > 
 > I cannot use a browser in to do the same because I am presently trying to
 > install the window manager and other applications via ports.

The ports collection uses the fetch(1) tool for retrieving
distfiles (i.e. source code) from the internet via HTTP or
FTP protocols.  If you need to use a proxy, add a line like
this to your file /etc/make.conf (create it if it doesn't
exist yet):

FETCH_ENV=  HTTP_PROXY=http://your.proxy.name:port/

You have to use the right hostname and port number of the
proxy, of course, for example:

FETCH_ENV=  HTTP_PROXY=http://proxy.internal.net:3128/

You must use URL syntax for the proxy.  3128 is the default
port if omitted.  The HTTP_PROXY will also be used for FTP,
unless FTP_PROXY is also set.  So, if you need different
proxies (or different ports) for FTP and HTTP, you need two
lines, for example:

FETCH_ENV=  HTTP_PROXY=http://http-proxy.internal.net:3128/
FETCH_ENV+= FTP_PROXY=http://ftp-proxy.internal.net:3129/

(Note the "+=" on the second line.)

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"And believe me, as a C++ programmer, I don't hesitate to question
the decisions of language designers.  After a decent amount of C++
exposure, Python's flaws seem ridiculously small." -- Ville Vainio


More information about the freebsd-questions mailing list