Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

It is currently Fri Jun 05, 2020 10:17 am

Message body:
Enter your message here, it may contain no more than 60000 characters. 

:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
Font colour
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.

Topic review - Set up HTTP PROXY for shell internet access Linux/FreeBSD
Author Message
Post subject: Set up HTTP PROXY for shell internet access Linux/FreeBSD  |  Post Posted: Tue Jan 20, 2015 4:59 pm
Setting HTTP PROXY for command line tools such as wget/fetch/pkg_add/yum/apt-get on Linux and Freebsd.

Wget/apt-get/fetch/yum/pkg_add -rv and the rest of command line tools in Linux and FreeBSD that use HTTP protocol will not use the proxy settings from your Firefox/Konqueror/Opera browsers. Instead, an environment variable "HTTP_PROXY" must be set and exported.

Assuming that your HTTP Proxy IP address is port 3128 (standard proxy port), you must use following command (as the user you wish you have this setting for):

# export HTTP_PROXY=''

Setting up HTTP Proxy with authentication for command line tools in FreeBSD and Linux

export HTTP_PROXY='http://username:password@'
In order to make this proxy permanent, add the line to your ~/.profile or /etc/profile or ~/(bash|ksh|sh)rc file.

The export command is obvious: it tells the shell that all programs started from this point on, to use this variable.

Removing HTTP_PROXY for current shell requires unsetting the variable:
# unset HTTP_PROXY

Note: Some shells require the variable in lower case: "http_proxy".
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list

Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]