Update openvpn-install-more-secure.sh
This commit is contained in:
parent
cb8b34c81e
commit
07a8357f56
1 changed files with 7 additions and 7 deletions
|
|
@ -56,14 +56,14 @@ function checkOS () {
|
||||||
elif [[ -e /etc/centos-release ]]; then
|
elif [[ -e /etc/centos-release ]]; then
|
||||||
if ! grep -qs "^CentOS Linux release 7" /etc/centos-release; then
|
if ! grep -qs "^CentOS Linux release 7" /etc/centos-release; then
|
||||||
echo "Your version of CentOS is not supported."
|
echo "Your version of CentOS is not supported."
|
||||||
echo "The script only support CentOS 7."
|
echo "This script only supports CentOS 7."
|
||||||
echo ""
|
echo ""
|
||||||
unset CONTINUE
|
unset CONTINUE
|
||||||
until [[ $CONTINUE =~ (y|n) ]]; do
|
until [[ $CONTINUE =~ (y|n) ]]; do
|
||||||
read -rp "Continue anyway? [y/n]: " -e CONTINUE
|
read -rp "Continue anyway? [y/n]: " -e CONTINUE
|
||||||
done
|
done
|
||||||
if [[ "$CONTINUE" = "n" ]]; then
|
if [[ "$CONTINUE" = "n" ]]; then
|
||||||
echo "Ok, bye!"
|
echo "Install cancelled."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -78,11 +78,11 @@ function checkOS () {
|
||||||
|
|
||||||
function initialCheck () {
|
function initialCheck () {
|
||||||
if ! isRoot; then
|
if ! isRoot; then
|
||||||
echo "Sorry, you need to run this as root"
|
echo "Sorry, you need to run this as root. Please try running the script again but type sudo first."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! tunAvailable; then
|
if ! tunAvailable; then
|
||||||
echo "TUN is not available"
|
echo "TUN is not available!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
checkOS
|
checkOS
|
||||||
|
|
@ -187,11 +187,11 @@ private-address: ::ffff:0:0/96' > /etc/unbound/openvpn.conf
|
||||||
|
|
||||||
function installQuestions () {
|
function installQuestions () {
|
||||||
echo "Welcome to the OpenVPN installer!"
|
echo "Welcome to the OpenVPN installer!"
|
||||||
echo "The git repository is available at: https://github.com/angristan/openvpn-install"
|
echo "The git repository is available at: https://github.com/dex4k/openvpn-hardened-install"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "I need to ask you a few questions before starting the setup."
|
echo "I need to ask you a few questions before starting the setup."
|
||||||
echo "You can leave the default options and just press enter if you are ok with them."
|
echo "You can leave the default options and just press enter if you are okay with them."
|
||||||
echo ""
|
echo ""
|
||||||
echo "I need to know the IPv4 address of the network interface you want OpenVPN listening to."
|
echo "I need to know the IPv4 address of the network interface you want OpenVPN listening to."
|
||||||
echo "Unless your server is behind NAT, it should be your public IPv4 address."
|
echo "Unless your server is behind NAT, it should be your public IPv4 address."
|
||||||
|
|
@ -258,7 +258,7 @@ function installQuestions () {
|
||||||
esac
|
esac
|
||||||
echo ""
|
echo ""
|
||||||
echo "What protocol do you want OpenVPN to use?"
|
echo "What protocol do you want OpenVPN to use?"
|
||||||
echo "UDP is faster. Unless it is not available, you shouldn't use TCP."
|
echo "UDP is faster and better. Unless it is not available, you shouldn't use TCP."
|
||||||
echo " 1) UDP"
|
echo " 1) UDP"
|
||||||
echo " 2) TCP"
|
echo " 2) TCP"
|
||||||
until [[ "$PROTOCOL_CHOICE" =~ ^[1-2]$ ]]; do
|
until [[ "$PROTOCOL_CHOICE" =~ ^[1-2]$ ]]; do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue