From 5101fcf8d73426fd94a1631e2bba86acbe3211f9 Mon Sep 17 00:00:00 2001 From: Cormac Garvey Date: Wed, 30 Oct 2019 16:24:08 -0600 Subject: [PATCH] Removed sudo --- scripts/setup_vpn_client.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/setup_vpn_client.sh b/scripts/setup_vpn_client.sh index 9d0beee2..28419883 100755 --- a/scripts/setup_vpn_client.sh +++ b/scripts/setup_vpn_client.sh @@ -8,7 +8,7 @@ if [[ $VPN_CLIENT_LIC_SAS_URL =~ .*\/(.+)\? ]]; then echo $VPN_CLIENT_LIC_TAR fi -sudo yum install -y openvpn +yum install -y openvpn pushd /tmp wget -O $VPN_CLIENT_LIC_TAR "${VPN_CLIENT_LIC_SAS_URL}" @@ -16,16 +16,16 @@ mkdir /tmp/lic pushd lic tar xvf ../$VPN_CLIENT_LIC_TAR -sudo cp * /etc/openvpn/. -sudo chmod 644 /etc/openvpn/* +cp * /etc/openvpn/. +chmod 644 /etc/openvpn/* -sudo systemctl enable openvpn@${VPN_CLIENT_CONF} -sudo systemctl start openvpn@${VPN_CLIENT_CONF} +systemctl enable openvpn@${VPN_CLIENT_CONF} +systemctl start openvpn@${VPN_CLIENT_CONF} -sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE +iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE -echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf -sudo sysctl -p +echo "net.ipv4.ip_forward = 1" | tee -a /etc/sysctl.conf +sysctl -p popd rm $VPN_CLIENT_LIC_TAR