0

Anybody please help me

Im unable to connect my server after run this command sudo ufw allow 'Nginx Full'.

In aws is there any option to undo this changes or anything else

Thanks in advance

djadam
  • 649
  • 1
  • 4
  • 20

3 Answers3

4
  1. Stop the running EC2 instance
  2. Detach its /dev/sda1 volume (let's call it volume A)
  3. Start the new t1.micro EC2 instance, create it on the same subnet, otherwise you will have to terminate the instance and create it again.
  4. Attach volume A to the new micro instance, as /dev/xvdf
  5. SSH to the new micro instance and mount volume A to /mnt/tmp
  6. Disable UFW by setting ENABLED=no in /mnt/tmp/etc/ufw/ufw.conf
  7. Exit
  8. Terminate micro instance
  9. Detach volume A from it
  10. Attach volume A back to the main instance as /dev/sda1 Start the main instance
  11. Login as before

Source

0

If you have server backup, try restoring to that backup.

If not, try looking at AWS Troubleshooting Guide.

Please post your error or logs upon connecting. Can't help much without logs.

Christoper Hans
  • 625
  • 4
  • 19
0

After struggling for 2 days I found few easy alternatives, here are those:

  • Use AWS session manager to connect with out ssh or key (yt)
  • Use EC2 serial console
  • Update the user instance details (link)
Abd
  • 85
  • 7