Vision clients have access to more information about the local network environment than just an IP address. Consider using the myMacIds() function from this post:
and compare the result to running that function in the gateway, perhaps inside a message handler for sendRequest(). Pass the client's list of MAC Ids to sendRequest(), and return true/false to indicate whether they match the gateway. This approach works even if a client on the gateway connects via the gateway's IP address instead of localhost.