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?

gefragt vor einem Monat305 Aufrufe
2 Antworten
1
Akzeptierte Antwort

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
EXPERTE
AWS-SUM
beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat
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
EXPERTE
GK
beantwortet vor einem Monat
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen