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?

質問済み 1ヶ月前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
回答済み 1ヶ月前
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
回答済み 1ヶ月前
  • 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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ