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?

asked 11 days ago221 views
2 Answers
1
Accepted Answer

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
EXPERT
AWS-SUM
answered 11 days ago
profile picture
EXPERT
reviewed 11 days ago
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
answered 11 days ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions