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"