# Auto login based on IP

**URL:** <https://forum.inductiveautomation.com/t/auto-login-based-on-ip/104173>\
**Category:** Ignition\
**Tags:** ignition79, vision\
**Created:** [March 25, 2025, 4:13pm UTC](https://forum.inductiveautomation.com/t/auto-login-based-on-ip/104173 "2025-03-25T16:13:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [March 25, 2025, 4:21pm UTC](https://forum.inductiveautomation.com/t/auto-login-based-on-ip/104173/3 "2025-03-25T16:21:50Z")

</div>

Those will always return what the gateway sees as the client's IP address, which will be the IP address of a router if there is any NAT activity going on.

However, a Vision local script can directly interrogate the java environment for client addresses and MAC IDs, among other things. See this topic for inspiration:

> [@Mobile Client MAC Address](https://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…

---

_[View the full topic](https://forum.inductiveautomation.com/t/auto-login-based-on-ip/104173)._
