- This topic has 0 replies, 1 voice, and was last updated 4 years, 8 months ago by
John Pierce.
Viewing 0 reply threads
Viewing 0 reply threads
- You must be logged in to reply to this topic.
Kloxo Next Generation Community
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
--//