Posts tagged with authenticate

Linux Proxy Problems

May 7th, 2008

There are times when the sheer wealth of Linux distros and the associated differences between each actually leaves me wanting a bit more standardization between them.

A case in point is that since trying out many distos in a virtualized environment behind a proxy server that requires authorization it seems there is no standard way of specifying proxy servers.

On top of that it seems there is no global setting that reliably affects the entire system. On an average system there are many applications requiring internet access, curl, wget ,web browser, email program, software updater to name just a few.

Getting Firefox to access a proxy server is pretty easy but it requires me to individually set the server from within the Firefox preferences. My experiences so far show a few different possiblilites

  1. A popular one that should work globally is to set environment variables, something like this

    export http_proxy="http://username:password@server.com:port/" 

    This works for some people but it only takes a search on Google to find many people for whom this has no effect.

  2. From KDE there is a proxy option in the system settings, you can either use the environment setting from above or manually enter them. I’ve tried both these with Mepis and then used the Package Updater only to find these setting seem to be totally ignored (I get a 407 proxy error)
  3. If you use YUM as a package updater you can edit /etc/yum.conf and add these lines:

    # The proxy server - proxy server:port number
    proxy=http://server.com:port/
    # The account details for yum connections
    proxy_username=username
    proxy_password=password
    

    I used this on CentOS 5 and to my amazement it actually worked.

  4. A few times I would get the error about ‘nonnumerical port 8080?’ this turn out to be that the last ‘/’ at the end of the url is very important!
  5. Then there’s similar advice for adding http_proxy=………… to the /etc/wgetrc file, plus others for curl and many other programs.

My point here is that I just want a simple GUI to add my proxy servers and then by default all my applications requiring network access should honour these setting unless I have explicitly told the application to use it’s own settings.