Capture Public WAN IP Address in device inventory
Kace K1000 reports the internal IP address of nodes / endpoints on the network i.e. 10.0.0.2 / 192.168.1.2 etc. whether on site or off site. What is the best way to inventory the public WAN IP address in inventory on a recurring basis - check in, log in, full inventory, etc. in order to identify the approximate location of the device being used? I'd like to be able to capture a public IP address in Kace inventory so the equipment regional location can be easily identified. If a machine is ever lost, this also aids in knowing its approximate last location.
1 Comment
[ + ] Show comment
-
I have found a much simpler way: http://www.itninja.com/blog/view/k1000-create-a-custom-inventory-rule-that-shows-a-remote-pc-s-external-ip - AKaceUser 7 years ago
Answers (1)
Please log in to answer
Posted by:
Nico_K
7 years ago
the best way is to use a Custom Inventory Rule.
A few possibilites are described here:
http://www.itninja.com/blog/view/custom-inventory-rule-to-populate-public-ip
A few possibilites are described here:
http://www.itninja.com/blog/view/custom-inventory-rule-to-populate-public-ip
Comments:
-
Thanks. I have followed that and the Kace VBS script executes successfully (per the Kace logs) but the file is not saved in C:\Windows and I'm not sure why.
I did manage to get the script working on one machine by modifying the VBS script slightly (see below). However, it returns this error in Kace for another machine:
Running as SYSTEM
Directory DOES exist: C:\Windows\system32\config\systemprofile\AppData\Roaming
Creating process returned non-zero: C:\Windows\System32\cscript.exe C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\427\PublicIP.vbs: (5) Access is denied.
Error Code: 5
Status Code: 0
Dim o
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("C:\windows\PublicIP.txt",True)
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "http://ifconfig.me/ip", False
o.send
objFile.WriteLine "Public IP: " & o.responseText - AKaceUser 7 years ago-
sounds like the file is not found or has no correct rights.
The curl way works since 7 years without problems
(and is easier to implement) - Nico_K 7 years ago