There is a way to use nslookup to query a website named opendns.com to get the information (source and explanation):
nslookup myip.opendns.com resolver1.opendns.com
The command returns two IP addresses and the second is the external IP address for the client as per the screenshot below:
Once the information can be made available in the command line, a custom inventory rule can be made to get the information into the K1000. For more information on custom inventory rules, click here.
To create the custom inventory rule, do the following:
1. Navigate to Inventory>Software>Choose Action>New
2. Name and classify the rule as needed. Typically, adding a "CIR" in front of the name makes it easier to find later.
3. Select the operating system(s) that the rule needs to run on.
4. Under "Custom Inventory Rule", enter:
ShellCommandTextReturn(nslookup myip.opendns.com resolver1.opendns.com)
5. Click Save.
6. As systems start to check in and update inventory, the custom inventory rule should start adding the external IP address under Software>Custom Inventory Fields. As a reminder, the second IP address is the external IP for the client.
This is excellent! - ronco 9 years ago
1. deploy cURL to all systems (taking it from here: http://curl.haxx.se/download.html and do a file sync to c:\programdata\dell\kace\ownscripts\)
2. use this CIR: ShellCommandTextReturn(cmd /c C:\ProgramData\Dell\KACE\ownscripts\curl.exe -s ifconfig.me/ip)
Result is:
4) CIR 04W - Public IP Windows: x.x.x.x
[string] - Nico_K 9 years ago