1

My Amazon Lightsail instance was working fine until 1 hour before. I opened some ports in the network config in the browser dashboard and since then I cannot connect to the server. All the hosted websites are down and simply the instance is not working. I rebooted the server, but no luck. I am in a terrible situation right now. I don't know whether the instance has crashed altogether. Seems there's nothing that I could do at this point. Is this common? There's no way to contact the amazon support on this.

Update: After Tim's comment the firewall setting: enter image description here

This didn't work until 465, 587 and 9000 were removed. After that, everything was ok. The 3 ports mentioned above being the only three ports that were open earlier, ssh port, 22, was missing from the list. Therefore, I wasn't able to establish a connection.

picmate 涅
  • 113
  • 1
  • 6
  • 1
    Try opening up your security group all ports to all IPs (0.0.0.0/0). If it works that's your answer, put the rules back properly. Next try network ACLs. You should be able to restart the instance from the control panel, not sure about how LightSail works but it's probably like EC2 – Tim May 25 '17 at 22:27
  • Hi Tim, I am not very familiar with the setting there. Does this mean to create a rule with the port set to 0? – picmate 涅 May 25 '17 at 22:30
  • I added an image of the firewall config. Is that what you meant? Still, it is not working. – picmate 涅 May 25 '17 at 22:33
  • Hey, I actually got rid of the other port settings and it connected this time. Wow, that is a big relief. Thanks @Tim – picmate 涅 May 25 '17 at 22:36
  • 1
    LightSail may be different from full AWS. Given you have an answer please write it in the answer box below, step by step, so others can benefit from it :) – Tim May 26 '17 at 00:18
  • Hi Tim. I would be happy to do that. But, since you actually provided the answer, would you like to write it? I'll add a comment explaining my particular case below it. – picmate 涅 May 26 '17 at 00:57
  • It is very strange that removing TCP 0-65535 would have improved anything. The only explanations I can think of for why that might be are a little bit too preposterous to really mention. Be sure you take away an important lesson... make backup snapshots of your instances. They only cost $0.05 per GB per month for the storage space, so a backup for a $5 server (20 GB hard drive) is only another $1, and you restore them by creating a new instance from the snapshot... so a "restore" operation does not impact the already running machine. – Michael - sqlbot May 26 '17 at 11:23

1 Answers1

1

General this kind of problem is caused by a firewall. In full AWS this tends to be security groups or NACLs, but LightSail appears to be a simpler firewall interface.

Try to close any ports you don't need open. For example, if you don't use SSH, close port 22.

Tim
  • 30,383
  • 6
  • 47
  • 77
  • 2
    In Lightsail, ports are either open to the world, or they aren't open at all. There is no address matching. It's a very simplified subset of EC2, in its own VPC. If you peer it to your default VPC, everything on the inside of the Lightsail VPC is open and accessible on the private IPs. – Michael - sqlbot May 26 '17 at 01:54
  • Actually, my problem was accidentally closing port 22 and 80. So, I was not able to establish an ssh connection, leading me to believe the instance has crashed. Removed all rules from the firewall, and created a rule with the port parameter set to 0 (like Tim suggested). That way, the ssh port also opened up and I was back in business. Then, correctly added the ports that I accidentally removed. – picmate 涅 May 26 '17 at 14:38