How to check the ip in the ban list, with masks on nodejs and mongodb?

How to check the ip in the ban list, with masks on nodejs and mongodb?
I see the current 2 options, the vlob just every time to request all records and check a very long and expensive way IMHO.
Another option not to store the mask and right to reveal them and store ipshniki, then the verification will be faster, but it will be difficult for example to remove the ban then.
June 5th 19 at 21:40

Find more questions by tags JavaScriptMongoDBNode.js