I want to use a method to limit the ip that hosts with Nexus Repository 3 installed

https://help.sonatype.com/en/securing-nexus-repository-manager.html?&_ga=2.137942647.69920269.1715128294-1230241385.1710724776#limit-ips-that-can-be-reached-from-your-nexus-repository-host
I want to use a method to limit the ip that hosts with Nexus Repository 3 installed described in the above document can access, how do I do it?
and Is it possible to implement the method suggestion in the document by the method in the document below?

Also, is there a way not to expose error messages on http response when an error occurs?