Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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