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

FAQ
It is currently Tue Sep 27, 2016 9:26 am


Internet Protocol, Transport Control Protocol, Network protocols, Routing, Routers, IP aliases, Routes, Ethernet

Author Message
mandrei99
Post  Post subject: Set up HTTP PROXY for shell internet access Linux/FreeBSD  |  Posted: Tue Jan 20, 2015 4:59 pm

Joined: Tue Aug 04, 2009 9:16 am
Posts: 245

Offline
 

Set up HTTP PROXY for shell internet access Linux/FreeBSD

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 192.168.0.1 port 3128 (standard proxy port), you must use following command (as the user you wish you have this setting for):

Code:
# export HTTP_PROXY='http://192.168.0.1:3128'

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

Code:
export HTTP_PROXY='http://username:password@192.168.0.1:3128'
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:
Code:
# unset HTTP_PROXY

Note: Some shells require the variable in lower case: "http_proxy".





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Set up HTTP PROXY for shell internet access Linux/FreeBSD"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Set up FTP PROXY via command line in Linux/FreeBSD

mandrei99

0

11333

Tue Jan 20, 2015 5:01 pm

mandrei99 View the latest post

There are no new unread posts for this topic. FreeBSD and Linux: How to find live hosts on a directly connected subnet with ping

mandrei99

0

539

Mon Jan 12, 2015 9:24 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to add IP alias in Debian Linux to last after reboot

debuser

3

1040

Sat Jul 21, 2012 6:03 am

Harespok View the latest post

There are no new unread posts for this topic. Linux: How to list IPv6 neighbors

mandrei99

0

399

Thu Oct 09, 2014 3:11 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to add (persistent) static ARP entries in Linux

mandrei99

0

5343

Mon Sep 29, 2014 5:17 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux How to change hardware MAC address of an interface

debuser

1

536

Tue Dec 06, 2011 6:26 am

Zettie49 View the latest post

There are no new unread posts for this topic. DNS reverse lookup in Windows 7 and Linux using - nslookup

mandrei99

0

1678

Tue Jan 13, 2015 8:31 pm

mandrei99 View the latest post

There are no new unread posts for this topic. How to dump kernel route cache in Linux

mandrei99

0

893

Mon Jan 12, 2015 11:26 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux adding and removing vlan tagged interfaces

mandrei99

0

11102

Wed Aug 28, 2013 8:19 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux tso (tcp segmentation offload) - what it means and how to enable/disable it

mandrei99

0

13668

Fri Jan 16, 2015 5:41 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
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 ]



phpBB SEO