问题
Proto Recv-Q Send-Q Local Address Foreign Address State PID
tcp 0 0 ip:11080 0.0:* LISTEN -
tcp 0 0 ip:5070 0.0:* LISTEN -
tcp 0 0 ip:5071 0.0:* LISTEN -
tcp 0 0 **127.0.0.1:5072** 0.0:* LISTEN -
tcp 0 0 ip:11443 0.0:* LISTEN -
tcp 0 0 **127.0.0.1:11444** 0.0:* LISTEN -
Not able to access port (11444 & 5072) externally. Only working on Local Host not remotely. We are using Ubuntu on Google Compute Engine. Firewall rules Added
回答1:
As the netstat
output shows, your services listening on port 11444
and 5072
are bound to localhost (127.0.0.1)
which means they only accept connections on the local loop interface. Change the binding IP address on your service configuration to 0.0.0.0
.
回答2:
Just checking - have you also configured the firewall? By default, the ports may be blocked by the firewall. You can configure it to enable ports via either the Developer Console, or with the gcloud command line tool.
Some extra information about firewall's on Google Compute Engine can be found at: https://cloud.google.com/compute/docs/networking?hl=en#firewalls
来源:https://stackoverflow.com/questions/33083086/not-able-to-access-port11444-5072-externallyusing-ubuntu-on-google-compute