mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-02-05 05:01:34 +01:00
Fix IP Regex
Refined IP regex to only match IPs within the IPv4 spec.
This commit is contained in:
parent
8d57810fb9
commit
030c2e587c
@ -254,7 +254,7 @@ function installQuestions () {
|
||||
IP_RANGE="10.8.0.0"
|
||||
;;
|
||||
2)
|
||||
until [[ "$IP_RANGE" =~ ^([0-9]{1,3}\.){3}0$ ]]; do
|
||||
until [[ "$IP_RANGE" =~ ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}0$ ]]; do
|
||||
read -rp "Custom IP [x.x.x.0]: " -e -i 10.8.0.0 IP_RANGE
|
||||
done
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user