External IP configuration – connection being refused

I created a VM-instance, say myVM on GCE.
I assigned an external IP address during this. I then changed this
IP address from ephemeral to static. When I look up at
External IP Addresses page (https://console.cloud.google.com/networking/addresses/list),
I see that IP listed as static type and “In use by” myVM.

when I look up myVM on the console,
i see that myVM has both its internal and external IP-s set– external IP to that static one.

And this is what Google Cloud Shell says:

$ gcloud compute addresses list
NAME      REGION       ADDRESS           STATUS
myip-tmp  us-central1  <my-ext-IP-here>  IN_USE

My firewall rules are as follows:

$ gcloud compute firewall-rules list
NAME                    NETWORK  SRC_RANGES    RULES                         SRC_TAGS  TARGET_TAGS
default-allow-http      default  0.0.0.0/0     tcp:80                                  http-server
default-allow-https     default  0.0.0.0/0     tcp:443                                 https-server
default-allow-icmp      default  0.0.0.0/0     icmp
default-allow-internal  default  10.128.0.0/9  tcp:0-65535,udp:0-65535,icmp
default-allow-rdp       default  0.0.0.0/0     tcp:3389
default-allow-ssh       default  0.0.0.0/0     tcp:22
default-allow-tomcat    default  0.0.0.0/0     tcp:8080

There doesn’t seem to be anything wrong with my routing configuration (https://cloudplatform.googleblog.com/2015/07/Connection-Refused.html):

$ gcloud compute routes list
NAME                            NETWORK  DEST_RANGE     NEXT_HOP                  PRIORITY
default-route-097757cca4bcea23  default  10.128.0.0/20                            1000
default-route-188df012191065e7  default  10.132.0.0/20                            1000
default-route-1f4b4268226c612d  default  10.138.0.0/20                            1000
default-route-2741ac2c32a51d91  default  10.146.0.0/20                            1000
default-route-483e39a1a5e667a4  default  0.0.0.0/0      default-internet-gateway  1000
default-route-60eb77946bc9d9c4  default  10.140.0.0/20                            1000
default-route-d40f47fb8b8a867f  default  10.142.0.0/20                            1000

when i

$ curl localhost
0.1/
computeMetadata/

on GCloud Shell, i see the response. however, my external IP is still not active. when i make a call to it from wherever, i get an error:

$ curl <my-ext-IP-here>
curl: (7) Failed to connect to <my-ext-IP-here> port 80: Connection refused

What am i missing??

i’m running these on a Debian 8 image, in case it matters.

My first time with GCE or any other cloud. Excuse the naive Q if so.

//—————————–

UPDATE:

netstate gave me this:

$ sudo netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:8998          0.0.0.0:*               LISTEN      214/python      
tcp        0      0 127.0.0.1:57418         0.0.0.0:*               LISTEN      210/0           
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      216/python      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      27/sshd         
tcp        0      0 0.0.0.0:13080           0.0.0.0:*               LISTEN      199/nginx       
tcp        0      0 0.0.0.0:13081           0.0.0.0:*               LISTEN      199/nginx       
tcp        0      0 0.0.0.0:13082           0.0.0.0:*               LISTEN      199/nginx       
tcp        0      0 0.0.0.0:13083           0.0.0.0:*               LISTEN      199/nginx       
tcp        0      0 0.0.0.0:13084           0.0.0.0:*               LISTEN      199/nginx       
tcp        0      0 0.0.0.0:13085           0.0.0.0:*               LISTEN      199/nginx       
tcp6       0      0 :::22                   :::*                    LISTEN      27/sshd 

I got the following from tcpdump:

$ sudo tcpdump -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel

$ sudo tcpdump -n host <my-ext-IP-here>
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel

Related:


Leave a Reply