Chapter 2. Installing and configuring Insights proxy To set up the Insights 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. The first step in setting up Insights proxy is enabling the RHSM repository. Prerequisites You have at least one active Red Hat Enterprise Linux (RHEL) subscription. You have at least one system running RHEL version 9, for the Insights proxy installation. You are logged in to the system as root or have sudo permissions. Your architectural environment is either Intel or Arm. Procedure Open your command-line interface (CLI), and depending on your architectural environment, enter one of the following commands: If you are running an Intel architecture system: If you are running an ARM (AARCH64) architecture system: Verification step If your RHSM enablement procedure is successful, you will see the following output in the CLI: Repository insights-proxy-for-rhel-9-x86_64-rpms is enabled for this system. Additional resources Using Red Hat Subscription Manager 2.2. Installing the rhproxy and service controller You will install the rhproxy Red Hat Package Manager (RPM), which in turn installs the service controller. Then, you use the service controller to install and manage the rhproxy service. Prerequisites You have at least one active Red Hat Enterprise Linux (RHEL) subscription. You have at least one system running RHEL version 9 for the Insights proxy installation. You are logged in to the system as root or have sudo permissions. Your architectural environment is either Intel or Arm. Procedure Open your command-line interface, and run the following command: The /usr/bin/rhproxy path is now available for you to use. Verification step Verify the installation was successful by running the following command: Result 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. 2.3. Creating a new proxy user and logging into Podman By default, rhproxy runs without root permissions. Therefore, you will need to create a new user named 'rhproxy'. After you have created the rhproxy user, you will 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. You have at least one system running RHEL version 9, for the Insights proxy installation. You are logged in to the system as root or have sudo permissions. Your architectural environment is either Intel or Arm. Procedure From the CLI, run the following command to add your new rhproxy user: Verify your new user has been successfully added by running the following command: You should see the following output returned: uid=1002(rhproxy) gid=1002(rhproxy) groups=1002(rhproxy) This confirms that the user rhproxy exists in the system. It also prints the user and group IDs and the group(s) the user resides in. Switch to your new rhproxy user account. Login to Podman with your Red Hat credentials and run the following command as the rhproxy user: Verification step When login is successful the following output displays: Login succeeded. 2.4. Configuring your firewall You will need to modify your firewall settings so that your systems are able to access the Insights proxy. 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 You will need to add two ports and reload your firewall before your systems can access the Insights proxy. From the CLI, use the following commands to add required ports 3128 and 8443: Now that you have made adjustments to your firewall, you will need to install and start the rhproxy service: Result After a few seconds, you will be able to forward Red Hat Insights traffic to http://<rhproxy-hostname>:3128 . Verification steps Verify that the firewall configuration was successful by checking the status of the rhproxy service: 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: Additional resources Using Firewalls 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.crt Record your key in the following file: /home/rhproxy/.local/share/rhproxy/certs/rhproxy.key Additional resources An overview of Certificates and Security 2.6. Configuring client systems When you have the Insights proxy installed and running, you will need to configure your client systems. This enables Red Hat Subscription Manager (RHSM) and the Insights client tools to communicate with Insights through the proxy. You will only need to do this once, after the initial installation. Use the helper script, configure-client.sh , to complete your required configuration. Prerequisites You have root user access. 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. Important If you change the hostname or IP address of your Insights proxy, ensure the configure-client.sh script is rerun on each client system. Procedure Open your CLI, and use the curl command to download the helper script to configure-client.sh : Run the script as follows: Verification step Run the following test commands to ensure that your configuration was successful: Run this command on the client systems: Run this command on the Insights proxy server: Additional resources Using Red Hat Subscription Manager

Commands:
subscription-manager repos --enable=insights-proxy-for-rhel-9-x86_64-rpms
subscription-manager repos--enable=insights-proxy-for-rhel-9-aarch64-rpms
dnf install -y rhproxy
rpm -q rhproxy
useradd rhproxy
id rhproxy
[rhproxy@server ~]USD podman login registry.redhat.io
firewall-cmd --permanent --add-port=3128/tcp
firewall-cmd --permanent --add-port=8443/tcp
firewall-cmd --reload
[rhproxy@server ~] USD rhproxy install
[rhproxy@server ~] USD rhproxy start
[rhproxy@server ~] USD rhproxy status
[rhproxy@server ~]USD curl -L -x http://USD(hostname):3128 https://mirrors.fedoraproject.org/
curl -k -L https://<rhproxy-hostname>:8443/download/bin/configure-client.sh -o configure-client.sh
chmod +x configure-client.sh
./configure-client.sh --configure --proxy-host <rhproxy-hostname>
insights-client --test-connection
[rhproxy@server ~]USD rhproxy status