I use this, because i also stand behind a firewall with loadbalancer and want to use letsencrypt cert for public
wget https://raw.githubusercontent.com/joe-speedboat/linux.scripts/master/shell/openssl_check_cert_chain.sh
bash openssl_check_cert_chain.sh /etc/pki/letsencrypt/fullchain.pem
0: subject=CN = foreman.domain.tld
issuer=C = US, O = Let's Encrypt, CN = R10
1: subject=C = US, O = Let's Encrypt, CN = R10
issuer=C = US, O = Internet Security Research Group, CN = ISRG Root X1
2: subject=C = US, O = Internet Security Research Group, CN = ISRG Root X1
issuer=C = US, O = Internet Security Research Group, CN = ISRG Root X1
/etc/pki/letsencrypt/fullchain.pem: OK
dnf clean all
dnf -y install https://yum.theforeman.org/releases/3.11/el9/x86_64/foreman-release.rpm
dnf -y install https://yum.theforeman.org/katello/4.13/katello/el9/x86_64/katello-repos-latest.rpm
dnf -y install https://yum.puppet.com/puppet7-release-el-9.noarch.rpm
dnf repolist enabled
dnf -y upgrade
dnf -y install foreman-installer-katello
dnf -y install firewalld
systemctl enable firewalld --now
firewall-cmd \
--add-port="80/tcp" --add-port="443/tcp" \
--add-port="5647/tcp" \
--add-port="8000/tcp" --add-port="9090/tcp" \
--add-port="8140/tcp" \
#--add-port="53/udp" --add-port="53/tcp" \
#--add-port="67/udp" \
#--add-port="69/udp"
firewall-cmd --runtime-to-permanent
firewall-cmd --list-all
public (active)
services: cockpit dhcpv6-client ssh
ports: 80/tcp 443/tcp 5647/tcp 8000/tcp 9090/tcp 8140/tcp
ping -c1 localhost
ping -c1 `hostname -f`
echo "1.2.3.4 foreman01.domain.tld" >> /etc/hosts
echo "1.2.3.4 satellite.domain.tld" >> /etc/hosts
hostnamectl set-hostname `hostname -f`
dnf clean all
dnf makecache
dnf -y upgrade
yum -y install chrony
systemctl start chronyd
systemctl enable chronyd
echo sources | chronyc
reboot
foreman-installer --scenario katello \
--foreman-servername satellite.domain.tld \
--foreman-foreman-url https://satellite.domain.tld \
--foreman-unattended-url https://satellite.domain.tld \
--foreman-proxy-foreman-base-url https://satellite.domain.tld \
--foreman-proxy-registered-name satellite.domain.tld \
--foreman-proxy-registered-proxy-url https://satellite.domain.tld:9090 \
--foreman-proxy-puppet-url https://satellite.domain.tld:8140 \
--puppet-server-foreman-url https://satellite.domain.tld \
--foreman-proxy-template-url http://satellite.domain.tld:8000 \
--foreman-proxy-trusted-hosts satellite.domain.tld \
--foreman-proxy-trusted-hosts foreman01.domain.tld \
--foreman-proxy-trusted-hosts "127.0.0.1/8" \
--foreman-proxy-trusted-hosts "::1" \
--foreman-proxy-trusted-hosts "$(hostname -i)" \
--foreman-trusted-proxies "127.0.0.1/8" \
--foreman-trusted-proxies "::1" \
--foreman-trusted-proxies "$(hostname -i)" \
--foreman-initial-organization "BITBULL" \
--foreman-initial-location "Core" \
--foreman-initial-admin-username admin \
--foreman-initial-admin-password change-me. \
--enable-foreman-cli \
--enable-foreman-cli-katello \
--enable-foreman-plugin-statistics \
--enable-foreman-plugin-tasks \
--certs-server-cert "/etc/pki/letsencrypt/cert.pem" \
--certs-server-key "/etc/pki/letsencrypt/key.pem" \
--certs-server-ca-cert "/etc/pki/letsencrypt/fullchain.pem"
hammer settings list | grep foreman01
hammer settings set --id foreman_url --value https://satellite.domain.tld
hammer settings list | grep trusted_ho
# trusted_hosts | Trusted hosts | [] | List of hostnames, IPv4, IPv6 addresses or subnets to be trusted in addition ...
hammer settings set --id trusted_hosts --value '[foreman01.domain.tld, satellite.domain.tld, 1.2.3.4]'
# Setting [trusted_hosts] updated to [["foreman01.domain.tld", "satellite.domain.tld", "1.2.3.4"]].
foreman-installer \
--enable-foreman-plugin-remote-execution \
--enable-foreman-proxy-plugin-remote-execution-script

Content > Products > Repo Discovery
Products > Rocky Linux
Products > Rocky Linux > Repositories: ALL
Restrict to architecture: x86_64
Name: EPEL
Sync Plan: Daily
Repositories > New Repositoriy
Remind to sync all Repos before proceeding with this steps
Content > Content views > Create
Content > Content views > cv_rocky9 > Publish new version
Content > Activation Keys > Create
Content > Activation Keys > Create
curl https://raw.githubusercontent.com/joe-speedboat/linux.scripts/master/shell/foreman_host_disable_default_repos.sh | bash
EXAMPLE:
----------------------------------
KW01 -> "Library" (daily sync) into "TEST" Content View as Version "KW01"
KW02 -> Version "KW01" into "TEST-LATE" Content View
KW03 -> Version "KW01" into "PROD" Content View
KW04 -> Version "KW01" into "PROD-LATE" Content View
KW05 -> "Library" (daily sync) into "TEST" Content View as Version "KW05"
KW06 -> Version "KW05" into "TEST-LATE" Content View
KW07 -> Version "KW05" into "PROD" Content View
KW08 -> Version "KW05" into "PROD-LATE" Content View
...
subscription-manager repos --list