Accessing WP multisite via IP instead of domain

That’s not how URLs work. If it was, the internet would be incredibly easy to hack as you could access any file in the entire file system by appending it to the servers IP.

It’s also not how domains URLs and IPs work. Computers don’t connect to domains, they connect to IPs, all communication is via IP.

In order to retrieve a page, you need to send the URL in a HTTP GET request in the request headers so it knows which page to load, which is exactly what already happens in the browser right now, so it will not work.

I have a WP multisite installation protected with a firewall service which I cannot disable. Now, I need to access a particular site within the multisite installation via IP.

If you don’t provide a full URL, the remote server will not know what to serve, and fall back to the default, which will either be the root site in the multisite, or more likely an Nginx or Apache welcome page

protected with a firewall service which I cannot disable

I’m afraid that the solution you have devised is not going to work.

The solution, and the only solution, is to disable the firewall. It is unavoidable