spurin / diveintoansible-lab

Dive Into Ansible Lab
850 stars 531 forks source link

Not able to connect from ubuntu-c to any of other Hosts #34

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi James,

When connecting from ubuntu-c to any of other hosts (ubunt1,2,3 or centos1,2,3) or vice-versa.

However I am able to ping the mentioned hosts or IPs. I was checking on each host and saw the port 22 is open., so what should be the issue here ?

image

image

Here the version of docker and docker-compose as well as the configuration of the .env file,

image

Any suggestion, please ?

spurin commented 3 years ago

Hi @Hamnlet

This is quite peculiar, you're running Linux by the look of it, could you tell me more please about the parent OS?

Thanks

James

ghost commented 3 years ago

Hi @spurin , I am using openSUSE Leap 15.3.

spurin commented 3 years ago

Do you know if selinux or any firewalls are active?

spurin commented 3 years ago

I've not tried the lab in Suse myself but this looks to me like there is a firewall/iptables blocking access.

Have a look through the following as this suggests to me that there may be a default firewall as part of the setup -

https://doc.opensuse.org/documentation/leap/security/html/book-security/cha-security-firewall.html

ghost commented 3 years ago

H, Thank you for responding. This is not tied to selinux, since its disabled. I will check the above documentation you sent relative to security/firewall and will share later any progress. Thanks,

spurin commented 3 years ago

Perfect thanks, as a quick check, does

systemctl status firewalld

Show as running?

ghost commented 3 years ago

Yes you got it.. The firewalld daemon was running, I just disabled it and try.

I was able to get ssh connection across all hosts.

spurin commented 3 years ago

Wow! Great to hear it's working for you @Hamnlet

That's one strict default firewall 😁

Really hope you enjoy the rest of the course and appreciate your time working through the issue.

Best Regards

James

ghost commented 3 years ago

Thank you very much James.