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?

feita há um mês305 visualizações
2 Respostas
1
Resposta aceita

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
ESPECIALISTA
AWS-SUM
respondido há um mês
profile picture
ESPECIALISTA
avaliado há um mês
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
ESPECIALISTA
GK
respondido há um mês
  • 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.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas