I am shameless! I copied the codes and commands from CIS Benchmark PDF for RHEL 9. I just glued them together here.
I am not liable. My family and friends are not liable. My past, current and future employers are not related to this project so they are not liable.
Use it at your own risk. Only you are liable. None else is liable for any issue or damage.