This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The Standard Caveat applies: Always test before you implement on a production system. | |
# These steps assume you are connected to an AL2 EC2 instance as the ec2-user. | |
# I use this to enable SELinux as the very first step when creating a base AMI. It has worked for me without issues for the past 3+ years. | |
# 1. Install packages and autorelabel the filesystem | |
sudo yum -y install policycoreutils selinux-policy-targeted policycoreutils-python | |
sudo sed -i 's/SELINUX=disabled/SELINUX=permissive/g' /etc/selinux/config | |
sudo systemctl enable rhel-autorelabel | |
sudo systemctl enable rhel-autorelabel-mark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# OpenVPN automated installer for Debian, Ubuntu and CentOS | |
# This script will work on Debian, Ubuntu, CentOS and probably other distros | |
# of the same families. This is a completely automated install no user input necessary.. | |
# The script will use pre-defined values that can be changed manually in script. | |
# This script also assume server is behind NAT. | |
if [[ "$USER" != 'root' ]]; then | |
echo "This requiers root privileges" |