- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2014 02:46 PM
Hello,
Does anyone know how to get the client Local IP address in servicenow.
I see there is a way to get the Public IP address using the below method, but need a way to get the local IP address.
gs.getSession().getClientIP();
Please let me know if anyone has suggestion.
Thanks
Suresh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2015 02:16 PM
Hi Suresh,
I'm assuming you're trying to retrieve the client's local network address, which may be an RFC 1918 private IP behind some NAT device. You may be able to accomplish this via a client script using the methods described here: Can You Get A Users Local LAN IP Address Via JavaScript? - Stack Overflow
There is, to my knowledge, no way to do this purely on the server side within a business rule or script include. You would need a client script to run client-side JavaScript that could GlideAJAX the IP back to the server, at which point you could do something interesting with it.
Regards,
Scott Hall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2015 02:16 PM
Hi Suresh,
I'm assuming you're trying to retrieve the client's local network address, which may be an RFC 1918 private IP behind some NAT device. You may be able to accomplish this via a client script using the methods described here: Can You Get A Users Local LAN IP Address Via JavaScript? - Stack Overflow
There is, to my knowledge, no way to do this purely on the server side within a business rule or script include. You would need a client script to run client-side JavaScript that could GlideAJAX the IP back to the server, at which point you could do something interesting with it.
Regards,
Scott Hall
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2018 06:56 PM
Hello...
I need to get client local IP too. But i'm not good in script. Can you help me to explain it more, please?
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 09:40 AM
Wouldn't this work? gs.getSession().getClientIP(); (Though maybe this method didn't exist 8 years ago...)