0

I have an Ubuntu 16.04 GCloud Compute Engine instance. I was using port 8085 with that instance with no issues until one day I stopped the instance and then started it again, right now I cannot access any thing on port 8085.

Stuff I tried:

  1. I pinged my instance external IP (which is static) and there is traffic.
  2. I checked the VPC firewall rules and there is an active one for port 8085, and the tag is applied to the instance. enter image description here
  3. I created a simple server that returns hello world whenever I access port 80, and there is a response but not when I change the listen port to 8085.

Is there a way to check if the traffic is passing the gcloud firewall but is being blocked by ubuntu for some reason ?

This is my current iptables -L output:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
sshguard   all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain sshguard (1 references)
target     prot opt source               destination
Ayman
  • 103
  • 3

1 Answers1

1

You can use tcpdump on your VM as well as on the client machine you are trying to connect from. By comparing the output you can know if the packets are being dropped somewhere in between.

When running tcpdump make sure you don't include your ssh connection to the VM in the output as that will make the output quite noisy. On the VM I would run something along these lines:

tcpdump -pni eth0 '! port 22'

When testing connectivity to your VM make sure that you test from different networks in case the network you are doing your tests from happens to be dropping traffic. (If your question had included an IP address I might have tested this for you.)

kasperd
  • 30,455
  • 17
  • 76
  • 124
  • 1
    The problem was that the network I was testing from blacklisted that port. Testing from another network worked fine. – Ayman Dec 27 '17 at 08:59