google-compute-engine"/>

I have select allow http traffic when I create the instance and allow the tcp:80 traffice in VPC network setting, I also enabled port 80 in iptables, however I still cannot use netcat to connect to the 80 port, it's always "Connection refused". Anyone knows how to make it? Here is what my VPC setting looks like: My VPC setting, and my iptables looks like: enter image description here

Thanks!


Update: Sorry, my bad. I found I need to install Apache first then nc can find the 80 port opened.

Answer

Nothing jumps out as being wrong with your FW ACLs. I'm not familiar with google cloud compute but things I'd try :

Are you definitely listening on port 80? - confirm with 'net stat -anp | grep 80'

Can you connect to port 80 locally on the server? - confirm with 'telnet PUBLICIP 80'

Suppose it's always possible it's a routing issue if you have multiple interfaces, make sure the default gateway is out the front end gateway - 'route -n'

The connection refused suggests its a FW somewhere dropping the connection or its not making it to a HTTP serve

  • 1
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions