[步骤] Red Hat Satellite 必须软件包版本的查看

正文:

Red Hat Satellite 通常使用指定版本的软件。所以在安装或升级 Red Hat Satellite 时,我们需要设置 Red Hat Satellite 的模块流,在设置模块流以后,相应的软件就被锁定制在对应版本无法升级了。

我们可以通过查看 Red Hat Satellite 的模块流,确认有哪些软件被锁定在了哪些版本里

步骤一:

# dnf module enable satellite

或者:

# dnf module enable satellite:el8
......
Requires         : pki-core:[]
                 : platform:[el8]
                 : postgresql:[12]
                 : ruby:[2.7]

(补充:这里设置 el8 版本的 Red Hat Satellite 模块流为例)

步骤二:

# dnf module info

或者:

# dnf module info satellite:el8
......
Requires         : pki-core:[]
                 : platform:[el8]
                 : postgresql:[12]
                 : ruby:[2.7]

(补充:这里查看 el8 版本的 Red Hat Satellite 模块流为例)

参考文献:

https://docs.redhat.com/en/documentation/red_hat_satellite/6.15/html/installing_satellite_server_in_a_connected_network_environment/installing_server_connected_satellite#configuring-repositories_satellite

[步骤] Linux SCAP (Security Content Automation Protocol) 的生成 (Linux 开源安全报道的生成)

正文:

步骤一:安装 openscap 和相关组件

如果是 RHEL:

# yum install openscap openscap-scanner

如果是 SLE:

# zypper install openscap openscap-utils scap-security-guide

步骤二:下载最新的 SUSE 官方 OVAL 文件

2.1 进入存放下载的官方 OVAL 文件的目录

# cd /root

(补充:这里以把官方的 OVAL 文件下载到 /root 目录为例)

2.2 下载最新的官方 OVAL 文件

如果是 RHEL:

# wget -O - https://access.redhat.com/security/data/oval/v2/RHEL9/rhel-9.oval.xml.bz2

(补充:这里以下载 RHEL 9 官方的 OVAL 文件为例)

如果是 SLES:

# wget https://ftp.suse.com/pub/projects/security/oval/suse.linux.enterprise.15-patch.xml.bz2

(补充:这里以下载 SLE 15 官方的 OVAL 文件为例)

2.2 解压下载下来的 OVAL 文件

如果是 RHEL:

# bzip2 -d rhel-9.oval.xml.bz2

(补充:这里以解压 rhel-9.oval.xml.bz2 文件为例)

如果是 SLES:

# bzip2 -d suse.linux.enterprise.15-patch.xml.bz2

(补充:这里以解压 suse.linux.enterprise.15-patch.xml.bz2 文件为例)

步骤三:使用 SUSE 官方的 OVAL 文件生成 SCAP (Security Content Automation Protocol) 报告

如果是 RHEL:

# oscap oval eval  --report /root/rhel9.5_report20240101.html /root/rhel-9.oval.xml

(补充:这里以用刚刚下载的官方的 OVAL 文件生成名为 rhel9.5_report20240101.html 的 SCAP (Security Content Automation Protocol) 报告文件,并放在 /root 目录下为例)

如果是 SLES:

# oscap oval eval --report /root/sles15.5_report_20240101.html /root/suse.linux.enterprise.15-patch.xml

(补充:这里以用刚刚下载的官方的 OVAL 文件生成名为 sles15.5_report_20240101.html 的 SCAP (Security Content Automation Protocol) 报告文件,并放在 /root 目录下为例)

参考文献:

https://documentation.suse.com/compliance/all/html/SLES-openscap/index.html

[CONTENT] Linux common parameters of /etc/fstab file

/dev/vg/lv_var /var xfs nodev,nosuid,noexec 0 0
/dev/vg/lv_var_log /var/log xfs nodev,nosuid,noexec,x-systemd.requires-mounts-for=/var 0 0

(
Add:
1) nodev parameter here means this directory can not be interpreted by devices or blocks
2) nosuid parameter here means no setuid files can be created in this directory
3) noexec parameter here means no files can be executed in this directory
4) x-systemd.requires-mounts-for=/var here parameter means /var/log directory can not be mounted until /var directory has been mounted
)

[STEP] Linux Audit Log join /var/log/message

Main Content:

Step One: Modify /audit/plugins.d/syslog.conf file

# vim /audit/plugins.d/syslog.conf

Modify part content as follow:

Modify part content as follow:
......
active = no
......

Step Two: Restart auditd Service

# service auditd restart

Reference:

https://access.redhat.com/solutions/637863