# Install Gentoo through proxy

## blietaer

Hello,

At work we are using a proxy with auth (id/passwd).

I had no issue setting up (and updating) a debian box, using the apt-get proxy-setting filess configured properl.

But I have to admit that Gentoo is not that straightforward : although there are three notes on the proxy usage for links2 in the handbook (and this very forum), non of these settings are OK in my case...

```

$ links2 -http-proxy username:passwd@proxy:80 http://www.gentoo.org

```

I also exported http_proxy, ftp_proxy RSYN_PROXY and HTTP_PROXY.

I just can't imagine gentoo can't be installed through my very stupid (but strong) proxy...

Can you?

----------

## Gergan Penkov

What's your problem if you have proper http_proxy ftp_proxy exported, the downloading of the packages should work.

If you could not sync the portage tree - you have a problem, I used on such setup tor (torify emerge --sync) or proxychains, of course there was emerge-webrsync or sth of a kind, which could download snapshots of the tree.

----------

## wildhorse

I have done a complete installation of Gentoo 2006.0 from stage3 through an HTTP proxy and it worked just fine. Sometimes I do an emerge-webrsync to update everything and it works, too. A definition of HTTP_PROXY is all you need.

```
env | grep ^HTTP_PROXY=
```

Check the log file of the proxy.

----------

## blietaer

Well, I am not sure I am doing something wrong...

My proxy (the one I drop in Debian, firefox, MS-ie,..) is 

```
proxy : BZRG012

port : 80

ID: username

passwd: mypwd
```

my export is:

```
export HTTP_PROXY ="http://username:mypwd@BZRG012:80"
```

and the way I call links2 :

```
links2 http://www.gentoo.org
```

I also tried a lot of variant on :

```
links2 -http-proxy username:mypwd@BZRG012:80 http://www.gentto.org
```

(adding "http://" in front of the proxy, removing the username and pwd...)

can you immediately see what's wrong...?

----------

## chrismortimore

My proxy information:

proxy address: toaster.biscuits

port: 3128

So I run

```
export http_proxy="toaster.biscuits:3128"
```

And wget runs fine.  For links2, I just use the GUI "Network Options" thing, because I'm lazy.  Again, I set my proxy address to "toaster.biscuits:3128".  Note there is no "http://".  This is how I did an installation on 2 machines through a proxy.  Although given it doesn't need authentication, it might be different for you.

----------

## blietaer

mmmh I guess my issue is precisely that: authentification with id and pwd to pass as argument to links2...

huh, GUI? for links2? I though links2 was a command line browser for light environment, just like during the gentoo install prompt live CD...

----------

## chrismortimore

 *blietaer wrote:*   

> mmmh I guess my issue is precisely that: authentification with id and pwd to pass as argument to links2...
> 
> huh, GUI? for links2? I though links2 was a command line browser for light environment, just like during the gentoo install prompt live CD...

 GUI as in it has menus and stuff, but still in command line.  Hit F9, go to Options, then Network Setup (or words to that effect).

----------

## chrismortimore

Have you tried it as export http_proxy="username:password@proxy:port"?  I noticed in the gentoo handbook they have "http://" in front of all of their exports in the "Configuring your network" section, and given that I don't need them, it implies to me that for authentication I still wouldn't need them.

----------

## blietaer

Yes, I tried removing the "http://" in front of it.

For the kick, I tried wget and got a connection to my proxy, and then canceled by this same "ISA server" (?) saying that it needs authentification (and I _did_ provide ID/passwd the usual way..). Maybe my proxy just doesn't accept strings like "ID:pwd@proxy:port"

Concerning links2, I found indeed a ncurses GUI, and the network setup..where a field is available for proxy:port (no proposition for id:passwd, but tried anyway).

Still the message my proxy need auth...error 407.

Thank you for your help, I guess my problem is my proxy.

(but debian DOES use that very similar string in /etc/apt/apt.conf...)

----------

## imageek

i saw you  mention this was an ISA server.. do you also have to provide anything like a domain name? My work uses a web marshall proxy and we have to authenticate via the windows domain. So all of my proxy settings have:

```
http://domain_name\username:password@proxyhost.tld:8080"
```

The problem i had with the proxy is it choked on downloading the stage3 tarball  :Sad:  I am running debian right now but trying to figure out a way to get gentoo installed. One good thing is i am part of the network/security team and in a couple months (i just started) i can bypass the proxy all together.

----------

## blietaer

Totaly correct...usually I have to use such a domain (only two letters in front of my userid)

But shall I just use a "\" (slash) like your example?

I'll reboot and test it.

----------

## solamour

So... has anyone found a solution yet? I clearly remember proxy+auth worked a few months ago, but recently our friendly IT guy changed something and it stopped working. If it didn't work from the start, I most likely wouldn't have installed Gentoo at the first place. Strange...

__

sol

----------

## blietaer

Solamour, thank you for bringing this up, ...

Unfortunately, it never worked for me for gentoo through the office proxy, so I used the Debian distro that is ftp/http'ing thru it like a charm (I still don't get why neither..)

The fact that it actually _worked_ once for you is good news but the fact that they (found out your traffic?) changed the It config is probably very bad news for you...

IT admins aren't bad guys, but if your linux activities are appropriated in your job content (mine are not), you might just want to ask them for a bypass.

 :Rolling Eyes: 

----------

## solamour

I think our IT guys are OK with my Linux activities, because "emerge-webrsync" and "wget" work with our HTTP proxy+authentication and I never got any complaints. It's just that links (the console web browser) doesn't play nicely with the HTTP proxy+authentication, which (I think) wasn't the case in the past. Then again, I most likely was using an older version than 2006.1, so that might have something to do with it. Anyhow, I ended up using wget to get the stage files and the Portage snapshot file.

__

sol

----------

## booyaa

Did anyone ever resolve this?  I cannot for the life of me get links or links2 to work through our bluecoats.  I know those use windows auth to get out.  But no matter what I do... domain\username:password@proxy or username:password@proxy it still wont give me links

----------

## dewke

 *booyaa wrote:*   

> Did anyone ever resolve this?  I cannot for the life of me get links or links2 to work through our bluecoats.  I know those use windows auth to get out.  But no matter what I do... domain\username:password@proxy or username:password@proxy it still wont give me links

 

I never got links to work through my proxy at work, so i installed the portage tree and packages on the cd to install gentoo, and was able to use emerge-webrsync and emerge once I set http_proxy

----------

## dontremember

 *dewke wrote:*   

>  *booyaa wrote:*   Did anyone ever resolve this?  I cannot for the life of me get links or links2 to work through our bluecoats.  I know those use windows auth to get out.  But no matter what I do... domain\username:password@proxy or username:password@proxy it still wont give me links 
> 
> I never got links to work through my proxy at work, so i installed the portage tree and packages on the cd to install gentoo, and was able to use emerge-webrsync and emerge once I set http_proxy

 

I haven't tried links, but I'm getting variable results with wget and proxies here at work.  I have the proxy stuff set up in /etc/wget/wgetrc, and it usually works just fine, but on occasion it simply won't even *try* to use the proxy.  For instance, just a couple of minutes ago it happily download xchm sources, then barfed on opera...  In the same "emerge -uDf world" run, no less.  I picked a random opera url from the big list that it tried, dropped it into firefox and it downloaded OK.

----------

## think4urs11

The issue here most probably is the proxy server itself.

When it is an Microsoft ISA it needs to be configured to accept basic authentication, otherwise you need to install net-proxy/ntlmaps

Search the forums for ntlmaps about how to do it.

----------

