From 37740ea565975aa57d33a4fa5987c5c51550b92b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 22 Apr 2023 17:03:57 -0500 Subject: [PATCH] Update default.inc --- default.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/default.inc b/default.inc index a0f3969..3ca1967 100755 --- a/default.inc +++ b/default.inc @@ -34,6 +34,12 @@ IPprefix_by_netmask () { let c+=$((x%2)) 'x>>=1' done echo $c ; } + +ALLOWED_NETWORKS="10.10.0.0/16 10.5.0.0/20 192.168.5.0/24" + +IP_ALLOWED() { + grepcidr "${ALLOWED_NETWORKS}" <(echo "${1}") >/dev/null && echo "true" || echo "false" +} if type apt &>/dev/null; then ATYPE="apt"