Skip to content

Instantly share code, notes, and snippets.

@calum-github
Created April 24, 2015 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calum-github/9152985ab2b4dce96f7a to your computer and use it in GitHub Desktop.
Save calum-github/9152985ab2b4dce96f7a to your computer and use it in GitHub Desktop.
This script disables the firewall and SELinux
#!/bin/bash
echo "*** Stopping and disabling Firewalld ***"
systemctl stop firewalld && systemctl disable firewalld
echo "*** Firewalld: Disabled ***"
echo "*** Disabling SELinux ***"
sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
echo "*** SELinux: Disabled ***"
echo ""
echo "Ready to reboot? (y/n)"
read input
if [ $input = "y" ]; then
reboot
else
echo "No reboot? Your on your own!"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment