RedHatDemos/SecurityDemos

Selinux - Lab 2.3 issues

Closed this issue · 4 comments

simo5 commented

I did not realize I was looking at the "pre-configured for you steps" initially however I will report anyway the issues I found:

Can't install ansible:

# yum install ansible -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
RHEL8                                                            2.9 kB/s | 2.9 kB     00:01    
RHEL8-APPSTREAM                                                  1.3 MB/s | 2.9 kB     00:00    
No match for argument: ansible
Error: Unable to find a match

1st error trying ansible:

[root@selinux1 ~]# ansible all -i inventory -m ping -u root
 [WARNING]: Unable to parse /root/inventory as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit
localhost does not match 'all'

This is because of missing instruction to cd into /root/selinux_scripts, but after that is done we get another error:

[root@selinux1 ~]# cd selinux_scripts/
[root@selinux1 selinux_scripts]# ansible all -i inventory -m ping -u root
selinux3 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
selinux2 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
selinux5 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: ssh: connect to host selinux5 port 22: No route to host",
    "unreachable": true
}

And that showed me that indeed:

# ssh root@selinux5
ssh: connect to host selinux5 port 22: No route to host

However looking at the console I do see a machine called 7SELinux5, and can get a text console to it.

simo5 commented

Of course the following tests with curl also fail to reach selinux5

simo5 commented

And the rest of lab 2.3 fails all parts where selinux5 is mentioned too

simo5 commented

The reason seems to be selinux5 came up with IP 192.168.0.37 instead of 192.168.0.6 as indicated in selinux1's /etc/hosts file.
I did not try to fix this as I wasn't sure the meachine was correct anyway and did not want to break other exercises.

Thanks,
Only issue is different IP address should be fixed in next blueprint.