# Need to tell if client is running on same machine as gateway

**URL:** <https://forum.inductiveautomation.com/t/need-to-tell-if-client-is-running-on-same-machine-as-gateway/32314>\
**Category:** Ignition\
**Created:** [February 16, 2020, 6:10pm UTC](https://forum.inductiveautomation.com/t/need-to-tell-if-client-is-running-on-same-machine-as-gateway/32314 "2020-02-16T18:10:55Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 16, 2020, 8:17pm UTC](https://forum.inductiveautomation.com/t/need-to-tell-if-client-is-running-on-same-machine-as-gateway/32314/5 "2020-02-16T20:17:45Z")

</div>

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:

> [@Mobile Client MAC Address](http://forum.inductiveautomation.com/t/mobile-client-mac-address/23037/10):
>
> In a real Vision client, you can obtain the local MAC addresses with the following script: from java.net import NetworkInterface # Get list of local mac address as strings def myMacIds(): macs = [ni.hardwareAddress for ni in NetworkInterface.getNetworkInterfaces() if ni.hardwareAddress] return [":".join(["%02x" % (b & 0xff) for b in mac]) for mac in macs] Also, again in a real Vision client, you can obtain the outbound network interface and the corresponding local IP address the clien…

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.

---

_[View the full topic](https://forum.inductiveautomation.com/t/need-to-tell-if-client-is-running-on-same-machine-as-gateway/32314)._
