You could use Custom Scripts maybe?
#
# Specify absolute path of the custom script to be executed before
# the user logs in. The script can accept remote IP of the user’s
# machine as its input.
#
# E.g. UserScriptBeforeLogin /tmp/nxscript/script.sh
#
UserScriptBeforeLogin “/usr/NX/script.sh”
So you would implement a script which compares the remote IP to what’s on the ‘white or black list’ and then exit 0 or 1 depending on the result.
You can find information about custom scripts in the installation and configuration guides of the product you are using, for example: https://kb.nomachine.com/DT07S00246