Better vpn function names
This commit is contained in:
parent
6745a21324
commit
7e888f5de5
|
@ -126,7 +126,7 @@ function remove_vpn {
|
|||
if [ -d /etc/openvpn ]; then
|
||||
rm -rf /etc/openvpn
|
||||
fi
|
||||
firewall_deny_forwarding
|
||||
firewall_disable_vpn
|
||||
remove_completion_param install_vpn
|
||||
|
||||
# remove any client keys
|
||||
|
@ -269,7 +269,7 @@ y
|
|||
|
||||
create_user_vpn_key $MY_USERNAME
|
||||
|
||||
firewall_allow_forwarding
|
||||
firewall_enable_vpn
|
||||
systemctl openvpn start
|
||||
|
||||
APP_INSTALLED=1
|
||||
|
|
|
@ -110,7 +110,7 @@ function enable_ipv6 {
|
|||
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
|
||||
}
|
||||
|
||||
function firewall_deny_forwarding {
|
||||
function firewall_disable_vpn {
|
||||
read_config_param EXTERNAL_IPV4_ADDRESS
|
||||
if [ ! $EXTERNAL_IPV4_ADDRESS ]; then
|
||||
return
|
||||
|
@ -125,7 +125,7 @@ function firewall_deny_forwarding {
|
|||
save_firewall_settings
|
||||
}
|
||||
|
||||
function firewall_allow_forwarding {
|
||||
function firewall_enable_vpn {
|
||||
curr_external_ipv4_address=$(get_external_ipv4_address)
|
||||
iptables -A INPUT -i ${FIREWALL_EIFACE} -m state --state NEW -p udp --dport 1194 -j ACCEPT
|
||||
iptables -A INPUT -i tun+ -j ACCEPT
|
||||
|
|
Loading…
Reference in New Issue