Is there a way to view the list of IP addresses that were assigned to my iMac over a period of time (e.g., the last 30 days)? I'd like to get this information from the iMac itself if possible.
Network – How to Show History of IP Addresses Assigned to iMac
Network
Best Answer
By default your mac won't keep a history of DHCP address and times. I put together a launchd and script that should do the trick if you must have client side records for DHCP times and ips.
launcd plist called com.local.DHCP-History.plist that needs to be placed in /Library/LaunchDaemons/
Here is the script it will run, I put it in /usr/bin/ but you can put where you want just make sure to change the environment path in the launch daemon. You will have to create a folder called DHCP_History in /private/var/log/ to create the log files in.
DHCP_History.sh
Make sure that the script is executable and owned by root:wheel. Run these commands to do that:
Now every time DHCP gets renewed or changes it will create a file called DHCP_ChangeHistory.log inside /private/var/log/DHCP_History/thedate/