• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Kloxo Next Generation

Kloxo Next Generation Community

The Next Generation of Kloxo
  • Home
  • How can you help
  • Join the Community
  • Developer Resources
  • Forums
    • Registration
  • News

Recovering EC2 instance from lockout by the firewall.

Forums › Frequently asked questions › AWS › Recovering EC2 instance from lockout by the firewall.

  • This topic has 0 replies, 1 voice, and was last updated 6 months, 4 weeks ago by John Pierce.
Viewing 0 reply threads
  • Author
    Posts
    • September 24, 2020 at 2:08 am #296
      John Pierce
      Keymaster

      It is possible to turn off the firewall by inserting commands into the instance at startup. This done with the instances “User Data”.

      From the EC2 Instances page, select the instance’s checkbox and stop the instance via the Action menu

      Once the instance has stopped, select Actions > Instance settings > Edit user data

      Update the user data with the below script and restart the instance. This will turnoff and disable the firewall.

      Content-Type: multipart/mixed; boundary="//"
      MIME-Version: 1.0
      --//
      Content-Type: text/cloud-config; charset="us-ascii"
      MIME-Version: 1.0
      Content-Transfer-Encoding: 7bit
      Content-Disposition: attachment; filename="cloud-config.txt"
      #cloud-config
      cloud_final_modules:
      - [scripts-user, always]
      --//
      Content-Type: text/x-shellscript; charset="us-ascii"
      MIME-Version: 1.0
      Content-Transfer-Encoding: 7bit
      Content-Disposition: attachment; filename="userdata.txt"
      #!/bin/bash
      service iptables status
      service iptables stop
      chkconfig iptables off
      iptables -L
      iptables -F
      service iptables status
      systemctl disable firewalld
      systemctl stop firewalld
      systemctl status firewalld
      --//
  • Author
    Posts
Viewing 0 reply threads
  • You must be logged in to reply to this topic.
Log In

Forums › Frequently asked questions › AWS › Recovering EC2 instance from lockout by the firewall.

Primary Sidebar

Login

Log In
Register

Donate

Help Support Kloxo Next Generation

  • donate monthly
  • donate once only
Select a Donation Option (USD)

Enter Donation Amount (USD)

Recent Replies

  • bus smtp
  • bus smtp
  • bus smtp
  • clean install mysql error
  • Upload an empty PHP file

Recent Topics

  • bus smtp
  • clean install mysql error
  • gzip – phpmyadmin
  • Upload an empty PHP file
  • kloxong-0.1.2-final

Forums

  • AWS
  • KloxoNG Announcements
  • KloxoNG Bugs
  • Troubleshooting
  • KloxoNG Releases
  • KloxoNG Development
  • KloxoNG Support
  • Frequently asked questions
Copyright © 2021 · Kloxo Next Generation Community · Legals · Privacy · Log in