fix
This commit is contained in:
parent
9ea6cbe6c4
commit
09691a6439
1 changed files with 576 additions and 576 deletions
|
@ -196,7 +196,7 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
|||
fi
|
||||
exit
|
||||
;;
|
||||
4) exit;;
|
||||
4) exit ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
|
@ -365,7 +365,7 @@ iptables -t mangle -F
|
|||
iptables -t mangle -X
|
||||
iptables -P INPUT ACCEPT
|
||||
iptables -P FORWARD ACCEPT
|
||||
iptables -P OUTPUT ACCEPT" > /etc/iptables/flush-iptables.sh
|
||||
iptables -P OUTPUT ACCEPT" > /etc/iptables/flush-iptables.sh
|
||||
chmod +x /etc/iptables/flush-iptables.sh
|
||||
echo "[Unit]
|
||||
Description=Packet Filtering Framework
|
||||
|
@ -379,7 +379,7 @@ ExecReload=/sbin/iptables-restore /etc/iptables/iptables.rules
|
|||
ExecStop=/etc/iptables/flush-iptables.sh
|
||||
RemainAfterExit=yes
|
||||
[Install]
|
||||
WantedBy=multi-user.target" > /etc/systemd/system/iptables.service
|
||||
WantedBy=multi-user.target" > /etc/systemd/system/iptables.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable iptables.service
|
||||
fi
|
||||
|
@ -399,7 +399,7 @@ iptables -t mangle -F
|
|||
iptables -t mangle -X
|
||||
iptables -P INPUT ACCEPT
|
||||
iptables -P FORWARD ACCEPT
|
||||
iptables -P OUTPUT ACCEPT" > /etc/iptables/flush-iptables.sh
|
||||
iptables -P OUTPUT ACCEPT" > /etc/iptables/flush-iptables.sh
|
||||
chmod +x /etc/iptables/flush-iptables.sh
|
||||
echo "[Unit]
|
||||
Description=Packet Filtering Framework
|
||||
|
@ -413,7 +413,7 @@ ExecReload=/sbin/iptables-restore /etc/iptables/iptables.rules
|
|||
ExecStop=/etc/iptables/flush-iptables.sh
|
||||
RemainAfterExit=yes
|
||||
[Install]
|
||||
WantedBy=multi-user.target" > /etc/systemd/system/iptables.service
|
||||
WantedBy=multi-user.target" > /etc/systemd/system/iptables.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable iptables.service
|
||||
# Disable firewalld to allow iptables to start upon reboot
|
||||
|
@ -493,7 +493,7 @@ persist-tun
|
|||
keepalive 10 120
|
||||
topology subnet
|
||||
server 10.8.0.0 255.255.255.0
|
||||
ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf
|
||||
ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf
|
||||
# DNS resolvers
|
||||
case $DNS in
|
||||
1)
|
||||
|
@ -527,8 +527,8 @@ ifconfig-pool-persist ipp.txt" >> /etc/openvpn/server.conf
|
|||
echo 'push "dhcp-option DNS 176.103.130.131"' >> /etc/openvpn/server.conf
|
||||
;;
|
||||
esac
|
||||
echo 'push "redirect-gateway def1 bypass-dhcp" '>> /etc/openvpn/server.conf
|
||||
echo "crl-verify crl.pem
|
||||
echo 'push "redirect-gateway def1 bypass-dhcp" '>> /etc/openvpn/server.conf
|
||||
echo "crl-verify crl.pem
|
||||
ca ca.crt
|
||||
cert server.crt
|
||||
key server.key
|
||||
|
@ -540,7 +540,7 @@ tls-server
|
|||
tls-version-min 1.2
|
||||
tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256
|
||||
status openvpn.log
|
||||
verb 3" >> /etc/openvpn/server.conf
|
||||
verb 3" >> /etc/openvpn/server.conf
|
||||
|
||||
# Create the sysctl configuration file if needed (mainly for Arch Linux)
|
||||
if [[ ! -e $SYSCTL ]]; then
|
||||
|
@ -615,15 +615,15 @@ verb 3" >> /etc/openvpn/server.conf
|
|||
systemctl restart openvpn-server@openvpn.service
|
||||
systemctl enable openvpn-server@openvpn.service
|
||||
elif [[ "$VERSION_ID" = 'VERSION_ID="16.04"' ]]; then
|
||||
#The file is in a other dir
|
||||
sed -i 's|LimitNPROC|#LimitNPROC|' /lib/systemd/system/openvpn\@.service
|
||||
#The file is in a other dir
|
||||
sed -i 's|LimitNPROC|#LimitNPROC|' /lib/systemd/system/openvpn\@.service
|
||||
sed -i 's|/etc/openvpn/server|/etc/openvpn|' /lib/systemd/system/openvpn\@.service
|
||||
sed -i 's|%i.conf|server.conf|' /lib/systemd/system/openvpn\@.service
|
||||
systemctl daemon-reload
|
||||
systemctl restart openvpn-serve\@openvpn.service
|
||||
systemctl enable openvpn-server@openvpn.service
|
||||
|
||||
else
|
||||
else
|
||||
systemctl restart openvpn@server.service
|
||||
fi
|
||||
else
|
||||
|
@ -683,7 +683,7 @@ tls-client
|
|||
tls-version-min 1.2
|
||||
tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256
|
||||
setenv opt block-outside-dns
|
||||
verb 3" >> /etc/openvpn/client-template.txt
|
||||
verb 3" >> /etc/openvpn/client-template.txt
|
||||
|
||||
# Generate the custom client.ovpn
|
||||
newclient "$CLIENT"
|
||||
|
|
Loading…
Reference in a new issue