0

I was trying to configure proxy in my lubuntu 14.04. Since I wanted to use the username and password for my proxy authentication, I opted ntlm and installed it. Now I can use my proxy link as 127.0.0.1:3128. Since it is lubuntu, I dont have the gui option to set the proxy system wide as I was doing in the ubuntu machines. After googling, I have found one solution to add the proxy entries in /etc/environment as below :

http_proxy=http://127.0.0.1:3128/
https_proxy=http://127.0.0.1:3128/
ftp_proxy=http://127.0.0.1:3128/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY=http://127.0.0.1:3128/
HTTPS_PROXY=http://127.0.0.1:3128/
FTP_PROXY=http://127.0.0.1:3128/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

and created a file named /etc/apt/apt.conf.d/95proxies with the below entries :

Acquire::http::proxy "http://127.0.0.1:3128/";
Acquire::ftp::proxy "ftp://127.0.0.1:3128/";
Acquire::https::proxy "https://127.0.0.1:3128/";

My issue is now I cant install any packages using the apt-get command.

root@test014:~# apt-get install htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  htop
0 upgraded, 1 newly installed, 0 to remove and 153 not upgraded.
Need to get 65.3 kB of archives.
After this operation, 203 kB of additional disk space will be used.
Err http://in.archive.ubuntu.com/ubuntu/ utopic/universe htop amd64 1.0.3-1
  407  Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/h/htop/htop_1.0.3-1_amd64.deb  407  Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

When I checked as user, I can see the proxy entries set in env variable:

user1@test014:~$ echo $http_proxy
http://127.0.0.1:3128/

but root user was showing nothing :

user1@test014:~$ sudo bash
root@test014:~# echo $http_proxy

root@test014:~# exit

So I have added the same proxy entries in /etc/bash.bashrc as well and now I can see the env variables from root but still I am not able to run the apt-get commands as root or as normal user using sudo. Please advise

0

1 Answer 1

0

As far as I can see Your Proxy server require Autentification:

407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ) 
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/h/htop/htop_1.0.3-1_amd64.deb 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )

So You have to use another Proxy settings syntax:

http_proxy="http://username:password@proxyserver:port"
https_proxy="http://username:password@proxyserver:port"
...

Those username and password are Proxy server parameters usually given by network administrators (at our network they are username@domain:password)

1
  • I have installed the ntlm to avoid using the username and password in the env variables. Those username and password already set in the ntlm config file. Now as root, I can see the env variables successfully. root@test014:~# echo $https_proxy http://127.0.0.1:3128/ So I think for some reason the 95proxies config file in the apt is not taking.
    – Gopu
    Commented Apr 18, 2015 at 5:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .