mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-07-07 06:54:23 +02:00
Update openvpn-install.sh
Co-authored-by: randomshell <randshell@protonmail.com>
This commit is contained in:
parent
cd517ae074
commit
34d5de382e
@ -1151,13 +1151,11 @@ function removeOpenVPN () {
|
|||||||
# Get OpenVPN protocol from the configuration
|
# Get OpenVPN protocol from the configuration
|
||||||
PROTOCOL=$(grep '^proto ' /etc/openvpn/server.conf | cut -d " " -f 2)
|
PROTOCOL=$(grep '^proto ' /etc/openvpn/server.conf | cut -d " " -f 2)
|
||||||
|
|
||||||
if [[ "$PORT" == '1194' ]] && [[ "$PROTOCOL" == "udp" ]]; then
|
|
||||||
firewall-cmd --zone=public --remove-service=openvpn
|
firewall-cmd --zone=public --remove-service=openvpn
|
||||||
firewall-cmd --permanent --zone=public --remove-service=openvpn
|
firewall-cmd --permanent --zone=public --remove-service=openvpn
|
||||||
else
|
|
||||||
firewall-cmd --zone=public --remove-port="$PORT/$PROTOCOL"
|
# Remove defined openvpn service
|
||||||
firewall-cmd --permanent --zone=public --remove-port="$PORT/$PROTOCOL"
|
rm /etc/firewalld/services/openvpn.xml
|
||||||
fi
|
|
||||||
|
|
||||||
firewall-cmd --zone=trusted --remove-source=10.8.0.0/24
|
firewall-cmd --zone=trusted --remove-source=10.8.0.0/24
|
||||||
firewall-cmd --permanent --zone=trusted --remove-source=10.8.0.0/24
|
firewall-cmd --permanent --zone=trusted --remove-source=10.8.0.0/24
|
||||||
|
Loading…
x
Reference in New Issue
Block a user