Skip to content
Advertisement

Cannot access to CentOS from MS Windows via http

I have got installed CentOS 7 under virtual envirment. It has proper hostname so I can ping it and it has acccess to internet inside of it and I can ping by IP and host name outside of it. Also It has working Apache and its test page is fine that has been checked locally.

Now I would like to get access to this test page from the MS Windows but I cannot. (I can ping CentOS by IP and hostname.)

Has it something to do with Iptables or firewall?

enter image description here

And this link doesnt help as well https://serverfault.com/questions/459267/enabling-http-access-on-port-80-for-centos-6-3-from-console

I assume some settings should be changed under CentOS but I am not sure which of them.

My question is which steps I have to execute to allow all those things?

Advertisement

Answer

Either disable firewalld.service

systemctl disable firewalld.service
systemctl stop firewalld.service

Or allow access to port 80

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

Also disable SELINUX:

setenforce 0
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement