How to configure HTTP Proxy for Red Hat Subscription Management
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Subscription Manager (RHSM)
Issue
-
How do I configure internet connection through
HTTPProxy? -
Yum shows a time out error:
# yum clean all Loaded plugins: product-id, subscription-manager timed out
Resolution
There are 2 different ways to configure the HTTP Proxy for Subscription Manager:
Configuring an HTTP Proxy in the UI
-
Launch the Red Hat Subscription Manager GUI:
# subscription-manager-gui -
Click the Proxy Configuration button at the top of the window in the Tools area.
-
Check the Connect to Red Hat Network via an HTTP Proxy checkbox and enter the server location, in the format hostname:port.
-
If the proxy requires a username/password to allow access, then also select the User authentication checkbox and fill in the user credentials.
-
The configuration will be automatically applied, so when the proxy is configured, simply close the window.
Configuring HTTP Proxy in the CLI
-
Run the
subscription-managercommand as follows:# subscription-manager config --server.proxy_hostname=proxy.example.com --server.proxy_port=8080 --server.proxy_user=admin --server.proxy_password=secret -
Alternatively, proxy information can be added in subscription-manager configuration file in
/etc/rhsm/rhsm.confmanually with following options:# an http proxy server to use proxy_hostname = # port for http proxy server proxy_port = -
The following fields are also required when using an authenticated proxy:
# user name for authenticating to an http proxy, if needed proxy_user = # password for basic http proxy auth, if needed proxy_password = If the special character is included in user name or password, Using '' ,single quotes. ex) proxy_password ='abcd¥efg'
Diagnostic Steps
- Refer to the This content is not included.Red Hat Subscription Management Guide for more information.
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.