10.3. Transferring SELinux settings to another system with semanage
Use the following steps for transferring your custom and verified SELinux settings between RHEL 10-based systems.
Prerequisites
-
The
policycoreutils-python-utilspackage is installed on your system.
Procedure
Export your verified SELinux settings:
# semanage export -f ./<my-selinux-settings.mod>Copy the file with the settings to the new system:
# scp ./<my-selinux-settings.mod> <new-system-hostname>:Log in on the new system:
$ ssh root@<new-system-hostname>Import the settings on the new system:
<new-system-hostname># semanage import -f ./<my-selinux-settings.mod>