7

I have to use a proxy with authentication to connect to the Internet. But I can't find any solution for this.

I have modify my yum.conf, with a lot of possibilities:

proxy=http://myproxy.domaine.com:8080/
proxy_username=DOMAIN\user    or just   USER
proxy_password=mypasswd1      or leave blank

or I did this too:

proxy=http://DOMAIN\User:password@myproxy.domain.com:8080/

I also tried this:

http_proxy=http://DOMAIN\User:password@myproxy.domain.com:8080/
export http_proxy

But nothing works! When I do a yum update, it tells me:

[Errno 14] HTTP Error 407: Proxy Authentication Required

Does anyone have a solution, because since yesterday, I have tried all of these approaches, and I stil cannot connect to the Internet.

EDIT : I have a .pac file too. But no graphical mode in my host. So I don't know what to do with this file.

3 Answers 3

2

You could be behind an NTLM proxy.

I have used this solution before, and it works very well.

The solution is called NTLM Authorization Proxy Server

Take a look at http://ntlmaps.sourceforge.net/

4
  • Yeah I forget to mention I already saw this, but not sure how to use it. I modified the server.cfg, but then ... what I have to do ? Thanks for your answer
    – Nico
    Jul 23, 2013 at 8:43
  • Could you explain in a few sentences how to figure out whether NTLM authorization is required, and how to set up the NTLM authorization proxy? Jul 23, 2013 at 9:14
  • Ok, i set NTLM. Change parameters etc. Now, i got # yum update Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os error was [Errno 4] IOError: <urlopen error > Error: Cannot find a valid baseurl for repo: base !
    – Nico
    Jul 23, 2013 at 9:23
  • @Gilles, you have to change parameters in the server.cfg such as PARENT_PROXY, PORT, DOMAIN,USERNAME, PASSWORD. Then launch the service, and set 127.0.0.1:PORT as your proxy in yum.conf and env var. Hope this is clear and help you
    – Nico
    Jul 23, 2013 at 10:31
0

Try these:

export http_proxy="http://DOMAIN\User:password@myproxy.domain.com:8080/proxy.pac"
export ftp_proxy="http://DOMAIN\User:password@myproxy.domain.com:8080/proxy.pac"

Also if you can't find a form that works you may have better luck using a tool such as pacparser to assist in the setting of the proxy setting.

2
  • We found an ugly solution : take this vm out of ESXi, put it on a laptop with internet connection, then do my yum install =/ We waste too much time with this. But when we did what your wrote, we got the following : [Errno 4] IOError: <urlopen error > Error: Cannot find a valid baseurl for repo: base. Don't know why.
    – Nico
    Jul 23, 2013 at 10:37
  • @Nico - yes the proxy strings can be annoying, what is it set to on a PC in your environment. I used to look at it in IE and then adapt it accordingly.
    – slm
    Jul 23, 2013 at 11:19
0

I have used cntlm (an epel package) to get past a corporate firewall.

I run it on my host system, listening on port 3128.

I point everything on the host at it, and point the guest VMs at it also.

You just have to update the hashed credentials in the config file whenever you change your password. From memory, enter something like cntlm -I -m test_url and it asks for your username and password and spits out the lines to include in the config file for credentials.

Be careful about allowing other people to use your cntlm proxy or they can view their porn on your account and get you into trouble.

1
  • do you mind sharing the config - also, what are you using as the parent proxy?
    – ali haider
    Apr 14, 2014 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.