How to configure system-wide "proxy" settings for all users and their applications ?

Solution Unverified - Updated

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Issue

  • How to configure proxy settings in RHEL system, so that all applications in the GNOME should it for internet access ?
  • What is the way to configure RHEL system to use a proxy server for internet access (for all users) ?

Resolution

In RHEL, there are three ways to configure proxy client:

I) The http_proxy environment variable

  • There is an environment variable called http_proxy that can be used to specify proxy settings.

    export http_proxy=http://<proxy-server>:3128/
    
  • Add above line into /etc/environment file, it works for any users that connects with ssh. However, that does not work with users that login via the gui.

  • So put that line into a file in /etc/profile.d directory. It will set that environment variable for all users, who login into the gui.

    Note: It should also be stated that many programs have their own proxy configuration tools (Such as Firefox). Just having that environment variable may not accomplish what user needs.

II) Using the gui tools: [System-->Preference-->Network Proxy]

  • After specifying the setting using the above tool, user can configure various programs to use it.
  • For example, in firefox users can use the Use system proxy settings option to trigger the settings specified above.

III) Configure in each application separately.

  • Various applications provide option to define proxy settings.
  • For example, in Thinderbird go to:
 Edit ->Preferences ->'Network & Disk Space' Tab -> in Connection Settings -> Choose manual proxy configuration
    and define the *proxy* settings.
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.