Discover IP address of machine

Hi all,

I’ve got a tiny script in OS 9 that gets the IP address from ‘Network Setup Scripting’ but this beast don’t exist in OS X.

Anyone know how to get the IP address of the machine now?

Tony Williams

Go into system profile > Network. All info should be there.

RussG

set ifaddr to do shell script “ipconfig getifaddr en0”
display dialog ifaddr

P.

This only works if your connected through the ethernet connection (not, say, through an AirPort or modem PPP connection). It also only gets the internal IP address, not necessarily the public IP address. This has been covered here before. Try this:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]