이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 2. Installing and configuring the Red Hat Lightspeed proxy
To set up the Red Hat Lightspeed proxy, you will need to modify Red Hat Subscription Manager (RHSM) and your firewall. You will install the proxy and create a new rhproxy user. You will accept the automatically generated security certificate or create your own. Then, you will configure your client systems. You can customize your proxy by setting configuration options, running commands with options, and integrating with third-party servers.
2.1. Enabling the subscription manager repository 링크 복사링크가 클립보드에 복사되었습니다!
Red Hat Subscription Manager (RHSM) tracks the Red Hat products that your organization has purchased and the systems that the products are installed on. To start setting up the Red Hat Lightspeed proxy, enable the RHSM repository.
Prerequisites
- You have at least one active Red Hat Enterprise Linux (RHEL) subscription.
- For the Red Hat Lightspeed proxy installation, you have at least one system running RHEL version 9.
- You are logged in to the system as root or have sudo permissions.
- Your architectural environment is Intel or Arm.
Procedure
- Open your command-line interface (CLI).
Depending on your architectural environment, enter one of the following commands:
Intel architecture system:
subscription-manager repos --enable=insights-proxy-for-rhel-10-x86_64-rpms
[root@server ~]# subscription-manager repos --enable=insights-proxy-for-rhel-10-x86_64-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow ARM (AARCH64) architecture system:
subscription-manager repos--enable=insights-proxy-for-rhel-10-aarch64-rpms
[root@server ~]# subscription-manager repos--enable=insights-proxy-for-rhel-10-aarch64-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
If you successfully enabled RHSM, you will see the following output in the CLI:
Repository
insights-proxy-for-rhel-10-x86_64-rpmsis enabled for this system.
Additional resources
2.2. Installing the rhproxy and service controller 링크 복사링크가 클립보드에 복사되었습니다!
Install the rhproxy Red Hat Package Manager (RPM), which in turn installs the service controller. Then, use the service controller to install and manage the rhproxy service.
Prerequisites
- You have at least one active Red Hat Enterprise Linux (RHEL) subscription.
- For the Red Hat Lightspeed proxy installation, you have at least one system running RHEL version 9.
- You are logged in to the system as root or have sudo permissions.
- Your architectural environment is Intel or Arm.
Procedure
Open the command-line interface (CLI) and run the following command:
[root@server ~] # dnf install -y rhproxy
[root@server ~] # dnf install -y rhproxyCopy to Clipboard Copied! Toggle word wrap Toggle overflow
The /usr/bin/rhproxy path is now available for you to use.
Verification step
Verify the installation was successful by running the following command. If the installation is successful, the installed version is confirmed in the output. If the installation is unsuccessful, the output indicates that the procedure failed:
rpm -q rhproxy
[root@server ~]# rpm -q rhproxyCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Creating a new proxy user and logging into Podman 링크 복사링크가 클립보드에 복사되었습니다!
By default, rhproxy runs without root permissions. Create a new user named rhproxy and then log in to Podman to manage your systems.
Prerequisites
- Podman is installed on your system.
- You have at least one active Red Hat Enterprise Linux (RHEL) subscription.
- For the Red Hat Lightspeed proxy installation, you have at least one system running RHEL version 9.
- You are logged in to the system as root or have sudo permissions.
- Your architectural environment is Intel or Arm.
Procedure
To add your new
rhproxyuser, run the following command in the CLI:useradd rhproxy
[root@server ~]# useradd rhproxyCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that your new user has been successfully added by running the following command:
id rhproxy
[root@server ~]# id rhproxyCopy to Clipboard Copied! Toggle word wrap Toggle overflow The following output displays:
uid=1002(rhproxy) gid=1002(rhproxy) groups=1002(rhproxy)
-
This output confirms that the user
rhproxyexists in the system. It also prints the user and group IDs and the group that the user resides in.
-
Switch to your new
rhproxyuser account. Log in to Podman with your Red Hat credentials and run the following command as the
rhproxyuser:podman login registry.redhat.io
[rhproxy@server ~]$ podman login registry.redhat.ioCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verification
- If your login is successful, the following output displays:
- Login succeeded.
2.4. Configuring the firewalls for bidirectional communication with Red Hat Lightspeed 링크 복사링크가 클립보드에 복사되었습니다!
After you have installed Red Hat Lightspeed proxy you must configure your firewalls to allow bidirectional communication with Red Hat Lightspeed. This includes configuring the firewall on the system where the Red Hat Lightspeed proxy is installed and also configuring any global firewalls that might be in place between your clients and the Red Hat Lightspeed services.
2.4.1. Configuring your Red Hat Lightspeed proxy firewall 링크 복사링크가 클립보드에 복사되었습니다!
After you have installed the Red Hat Lightspeed proxy and configured the firewall, you must also configure any global firewalls to allow bidirectional communication with Red Hat Lightspeed. Allow all Red Hat subscription management and Red Hat Lightspeed client tools to communicate with the Red Hat Lightspeed services through the proxy.
For your systems to be able to access the Red Hat Lightspeed proxy, you must open ports 3128 and 8443 and restart the service. These required ports are also specified in the rhproxy.env file that gets created when you install Red Hat Lightspeed proxy.
If you are using your own proxy to connect to Red Hat Lightspeed, or you want the most up-to-date list of required ports to configure, see the rhproxy.env file in the Red Hat Lightspeed rhproxy GitHub repository.
The following procedure describes how to configure the required Red Hat ports on your firewall.
Prerequisites
- You have at least one active Red Hat Enterprise Linux (RHEL) subscription.
- Your RHEL system(s) are version 8 or 9.
- You have created a new rhproxy user.
- Your architectural environment is either Intel or Arm.
Procedure
From the CLI, use the following commands to add required ports 3128 and 8443:
[root@server ~] # firewall-cmd --permanent --add-port=3128/tcp
[root@server ~] # firewall-cmd --permanent --add-port=3128/tcpCopy to Clipboard Copied! Toggle word wrap Toggle overflow [root@server ~] # firewall-cmd --permanent --add-port=8443/tcp
[root@server ~] # firewall-cmd --permanent --add-port=8443/tcpCopy to Clipboard Copied! Toggle word wrap Toggle overflow [root@server ~] # firewall-cmd --reload
[root@server ~] # firewall-cmd --reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow Now that you have made adjustments to your firewall, you will need to install and start the rhproxy service:
[rhproxy@server ~] $ rhproxy install
[rhproxy@server ~] $ rhproxy installCopy to Clipboard Copied! Toggle word wrap Toggle overflow [rhproxy@server ~] $ rhproxy start
[rhproxy@server ~] $ rhproxy startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Result
After a few seconds, you will be able to forward Red Hat Lightspeed traffic to http://<rhproxy-hostname>:3128.
Verification steps
Verify that the firewall configuration was successful by checking the status of the rhproxy service:
[rhproxy@server ~] $ rhproxy status
[rhproxy@server ~] $ rhproxy statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow - When successful, the output confirms that the rhproxy service is active and running, and the most recent activity is logged.
- Enter the following command to test the functionality:
curl -L -x http://$(hostname):3128 https://mirrors.fedoraproject.org/
[rhproxy@server ~]$ curl -L -x http://$(hostname):3128 https://mirrors.fedoraproject.org/
Additional resources
To enable your client systems to securely access Red Hat Lightspeed, allow access to the Red Hat hostnames in your firewall or proxy.
If you are connecting to Red Hat Lightspeed with your own web proxy instead of the Red Hat Lightspeed proxy, you must also complete the global firewall configuration.
2.4.2.1. Adding the required Red Hat hostnames to your firewall allowlist 링크 복사링크가 클립보드에 복사되었습니다!
To allow bidirectional communication with Red Hat Lightspeed, configure a firewall or proxy on the outgoing network to permit traffic to Red Hat hostnames. If clients in your environment use any other repositories with additional hostnames, you must also allow traffic to those nodes.
When you install Red Hat Lightspeed proxy, the /home/rhproxy/.config/rhproxy/env/redhat.servers allowlist file gets created. This file contains the required hostnames for bidirectional communication with Red Hat Lightspeed.
If you are using your own proxy to connect to Red Hat Lightspeed, or if you want to view the most up-to-date list, see the Red Hat Lightspeed rhproxy GitHub repository.
Prerequisites
- You have at least one active Red Hat Enterprise Linux (RHEL) subscription.
- Your systems are running RHEL version 8 or later.
-
You created a new
rhproxyuser. - Your architectural environment is Intel or Arm.
- You completed the steps in Configuring your Red Hat Lightspeed proxy firewall.
Procedure
- Log on as a System Administrator on the outgoing network firewall or proxy.
Add the following Red Hat hostnames to the allowlist configuration:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Optional: If clients in your environment use any other repositories with additional hostnames, and you enabled those hostnames in the
mirror.serversfile on the Red Hat Lightspeed proxy node, make the corresponding changes to the firewall proxy. -
Optional: If you use Extra Packages for Enterprise Linux (EPEL) in your environment, configure the outgoing network firewall or proxy to permit traffic to the required hostnames. These hostnames are defined in the
epel.serversallowlist file. - Restart your firewall service to ensure that your allowlist changes take effect.
Verification steps
You can now connect and use Red Hat Lightspeed to gain visibility of your systems and proactively identify and mitigate operational and vulnerability risks.
- Enter the following curl command to test the functionality:
curl -L -x http://$(hostname):3128 https://mirrors.fedoraproject.org/
[rhproxy@server ~]$ curl -L -x http://$(hostname):3128 https://mirrors.fedoraproject.org/
Additional resources
2.5. Obtaining a security certificate 링크 복사링크가 클립보드에 복사되었습니다!
In order to establish a secure connection, you will need a certificate for accessing any resources served by the proxy. Note that the rhproxy service creates a self-signed certificate for downloads if none are found in the /home/rhproxy/.local/share/rhproxy/certs/ file.
If you prefer, you can provide your own HTTPS certificate and key, and record them in appropriate files. If you chose this route:
Record your certificate in the following file:
/home/rhproxy/.local/share/rhproxy/certs/rhproxy.crtRecord your key in the following file:
/home/rhproxy/.local/share/rhproxy/certs/rhproxy.key
Additional resources
2.6. Configuring client systems 링크 복사링크가 클립보드에 복사되었습니다!
After the Red Hat Lightspeed proxy is installed and running, you must configure your client systems so that Red Hat Subscription Manager (RHSM) and the Red Hat Lightspeed client tools can communicate with Red Hat Lightspeed through the proxy. You only need to do this configuration one time after the initial installation by using the helper script, configure-client.sh.
Prerequisites
- You have root user access.
- You have at least one active Red Hat Enterprise Linux (RHEL) subscription.
- You have at least one system running RHEL version 8 or later.
-
You created a new
rhproxyuser. - Your architectural environment is Intel or Arm.
If you change the hostname or IP address of your Red Hat Lightspeed proxy, you must rerun the configure-client.sh script on each client system.
Procedure
In the CLI, run the following the curl command to download the helper script to
configure-client.sh:curl -k -L https://<rhproxy-hostname>:8443/download/bin/configure-client.sh -o configure-client.sh
[root@client ~]# curl -k -L https://<rhproxy-hostname>:8443/download/bin/configure-client.sh -o configure-client.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow chmod +x configure-client.sh
[root@client ~]# chmod +x configure-client.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following script:
./configure-client.sh --configure --proxy-host <rhproxy-hostname>
[root@client ~]# ./configure-client.sh --configure --proxy-host <rhproxy-hostname>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification step
Run the following command on the client systems:
insights-client --test-connection
[root@client ~]# insights-client --test-connectionCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command on the Red Hat Lightspeed proxy server:
rhproxy status
[rhproxy@server ~]$ rhproxy statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional resources
2.7. Viewing the proxy server tag for a Red Hat Lightspeed client 링크 복사링크가 클립보드에 복사되었습니다!
Once you have configured a registered Red Hat Lightspeed client system to use a proxy server, you can view the client system with its tag in the Hybrid Cloud Console. The insights-proxy:<proxy-hostname> tag indicates which Red Hat Lightspeed proxy host the system uses.
The Red Hat Lightspeed proxy server itself does not use the tag for identification. Only systems connected to a proxy server have the insights-proxy:<proxy-hostname> tag.
For more information about how to view client systems and their associated proxy servers in inventory, see Assessing and filtering your inventory.