The validation function is designed such that the examples given in the README.md do not pass validation:
validate_allowed_ips() {
local ips="$1"
# Validate AllowUsers entries and IP addresses
if ! echo "$ips" | grep -E '^(AllowUsers|from) [a-zA-Z0-9@., ]+$'; then
echo "Invalid ALLOWED_IPS format"
exit 1
fi
}
This example scenario from the readme would not pass validation by the above function:
ALLOWED_IPS="AllowUsers *@192.168.1.0/24 *@172.16.0.1 *@10.0.*.1"
The validation function is designed such that the examples given in the README.md do not pass validation:
This example scenario from the readme would not pass validation by the above function: