[finishes #77127142] Fixes IP address whitelisting

-uses valid subnets in the spec
Fixes test flakiness

- uses test ENV array instead of stubbing it