[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-get and Firewall

Hash: SHA1

On Thursday 21 February 2002 10:22 am, Pedro Alves wrote:
> Dear friends
> After sucessufully installing debian from official CD distribution, I
> would like to install some packages using apt-get. At the time of the
> installation I only choose the CD-ROM as source, but now I need to do
> it from FTP, or HTTP sources, so first question is how to reconfigure
> apt-get to use then also? Do I have to edit the settings file (which
> is, and where is it?). Second, since I'm under the surveillance of a
> firewall I have fear that it will interfere with transfers, so how I
> confugure apt-get to use the firewalll settings?
> Sorry for this quite simple questions, but i'm new in Linux.
> Pedro

Edit the /etc/apt/sources.list, commenting out the cdrom lines and 
uncommenting the lines regarding http:// access.  This file is fairly well 
documented, so it should be a "read and do the right thing" exercise.  Now, 
how you configure the firewall depends on what type it is.  Does it block all 
outgoing http and ftp transfers?  If one is "unregulated", use that.  If both 
are blocked, then you need to export a variable on the command-line called 
http_proxy.  Type this:

export http_proxy='http://firewall.igr.fr:8080";

changing the hostname and port as needed.  If it is an *authenticating* proxy 
(like mine), then you need to change that to:

export http_proxy="username:password@firewall.foo.com:3128"
(again, changing as needed)

Now, test it by running "apt-get update" as root.  Btw, these variables must 
by set by the user running apt-get, otherwise they won't take effect.  If 
apt-get update runs correctly, great! Otherwise, check for typos and try 
again.  Reply to the mailing list if nothing seems to work :-)

Once you get it all working correctly, edit your .bash_rc and put the correct 
line in there, so that it is automatically exported for you as you login.  


- -- 
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org


Reply to: