• 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
  • Get Kloxo
  • How can you help
    • Join the Community
    • Donate
  • Support
    • Registration
    • Developer Resources
  • News

Recovering EC2 instance from lockout by the firewall.

  • This topic has 0 replies, 1 voice, and was last updated 4 years, 8 months 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

    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)
    [crypto-donation-box]

    Recent Replies

    • Upgrading from Kloxo-MR to KloxoNG?
    • Upgrading from Kloxo-MR to KloxoNG?
    • Upgrading from Kloxo-MR to KloxoNG?
    • Upgrading from Kloxo-MR to KloxoNG?
    • Upgrading from Kloxo-MR to KloxoNG?

    Recent Topics

    • Update php to 8.1
    • Install Kloxo ng ok now
    • ftp connection error
    • Unable to create email account
    • Kloxong 0.1.3-2 released

    Forums

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