Can't connect to instance after enabling ufw verbose

0

I enabled ufw verbose that closed all ports, so i think i can't connect ssh to my instance due to ufw, now i can't connect to my instance using nor lightsail ssh console nor my own windows console. Tried to snapshot and create a new instance, but i think ufw settings also inherited so i can't connect to new instance either. What to do?

已提问 25 天前290 查看次数
2 回答
1
已接受的回答

Hi,

You could try injecting commands in the launch-script while creating a new instance from the snapshot to potentially recover access to the instance.

For inspiration an example can be seen here

Thanks.

profile pictureAWS
专家
AWS-SUM
已回答 25 天前
profile picture
专家
已审核 25 天前
0

Hi

  1. Access via Lightsail console (if available): Lighsail offers a console access option. This might be available through the web interface and could allow you to access the instance directly bypassing SSH. Once logged in, you can disable ufw.
  2. Stop the instance and add user data script to disble the UFW. Example
sudo ufw disable

3.use snapshot restore Click the link for the steps

profile picture
专家
GK
已回答 25 天前
  • They are unable to access the instance via the console per their original post.

    And there's no option to add user data script on a stopped instance in Lightsail.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则