This commit is contained in:
Cormac Garvey 2019-10-30 16:24:08 -06:00
Родитель 0ad364c1c0
Коммит 5101fcf8d7
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -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