Ubuntu – Configuring proxy terminal (ubuntu)

exportPROXYUbuntu

I'm running a ubuntu-server in a VirtualBox and need to configure the terminal to access internet through the proxy.

I've tried:

export http_proxy=http://USERNAME:PASSWD@proxy.mycompany.com:8080

I'll show the output in a simple wget debug mode tentative:

$ wget http://nexus.sonatype.org/downloads/nexus-webapp-1.3.6-bundle.tar.gz -d

DEBUG output created by Wget 1.11.4 on cygwin.

--2009-11-25 16:35:31--  http://nexus.sonatype.org/downloads/nexus-webapp-1.3.6-bundle.tar.gz
Resolving proxy.mycompany.com... 192.168.0.10
Caching proxy.mycompany.com => 192.168.0.10
Connecting to proxy.mycompany.com|192.168.0.10|:8080... connected.
Created socket 3.
Releasing 0x00690ac0 (new refcount 1).

---request begin---
GET http://nexus.sonatype.org/downloads/nexus-webapp-1.3.6-bundle.tar.gz HTTP/1.0
User-Agent: Wget/1.11.4
Accept: */*
Host: nexus.sonatype.org
Proxy-Authorization: Basic cmMhc3RhtyuiOlN1cHBheeQyMDA9

---request end---
Proxy request sent, awaiting response...
---response begin---
HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied)
Via: 1.1 MAXIN00
Proxy-Authenticate: Negotiate
Proxy-Authenticate: Kerberos
Proxy-Authenticate: NTLM
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 4106

---response end---
407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied)
Closed fd 3
2009-11-25 16:35:31 ERROR 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied)

Does some one could give me any tip?

Thanks in advance

Best Answer

The problem is that wget only supports basic auth to proxies, and your proxy doesn't accept that sort of authentication. Your options are:

  1. Patch wget to support one of the accepted methods of authentication
  2. Get your proxy admin to allow basic auth
  3. Don't use a proxy
  4. Use a different proxy (either one that doesn't require auth, or which accepts basic auth)