mardi 6 mai 2014

Google moteur de calcul - problèmes de pare-feu CentOS sur CME - Stack Overflow


I am trying out a "Hello World" exercise for GCE. First, I went with CentOS Image, added the instance, installed Apache, added the Firewall. All looks good as far as configuration is concerned. When I try to access the web page from outside, it cannot reach the page.


The Local Apache Server is running, from the local instance I can do a curl and all is well.


On the other hand, if I try out the same exact steps with the Debian distribution, everything works smoothly.


I saw another post that mentioned about additional firewall settings but I have not tried that out and I am not sure why it should be done either.


Can anyone explain if the CentOS setup does need additional Firewall settings and what those are?




CentOS defaults to a restrictive operating system level firewall (using iptables), while debian defaults to a permissive one. You can relax the firewall rules on CentOS as well. When running on Compute Engine, the service level firewall will only allow connections from the internet via configured ports.


To relax the CentOS firewall:


$ sudo iptables -D  INPUT -j REJECT --reject-with icmp-host-prohibited

Then test that your connections work as expected. To save this configuration across system reboots:


$ /sbin/service iptables save

See the IPTables HowTo on the CentOS wiki for more information about working with iptables on CentOS.




You need free the ports in the cloud console.


Watch this video that explain the proccess.


Google Compute Engine Test Drive



I am trying out a "Hello World" exercise for GCE. First, I went with CentOS Image, added the instance, installed Apache, added the Firewall. All looks good as far as configuration is concerned. When I try to access the web page from outside, it cannot reach the page.


The Local Apache Server is running, from the local instance I can do a curl and all is well.


On the other hand, if I try out the same exact steps with the Debian distribution, everything works smoothly.


I saw another post that mentioned about additional firewall settings but I have not tried that out and I am not sure why it should be done either.


Can anyone explain if the CentOS setup does need additional Firewall settings and what those are?



CentOS defaults to a restrictive operating system level firewall (using iptables), while debian defaults to a permissive one. You can relax the firewall rules on CentOS as well. When running on Compute Engine, the service level firewall will only allow connections from the internet via configured ports.


To relax the CentOS firewall:


$ sudo iptables -D  INPUT -j REJECT --reject-with icmp-host-prohibited

Then test that your connections work as expected. To save this configuration across system reboots:


$ /sbin/service iptables save

See the IPTables HowTo on the CentOS wiki for more information about working with iptables on CentOS.



You need free the ports in the cloud console.


Watch this video that explain the proccess.


Google Compute Engine Test Drive


0 commentaires:

Enregistrer un commentaire