Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Related question' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Related question
Authored by: ggliddy on Sep 05, '01 02:22:58PM

Another question. How about if your IP is not static? Does anyone know a way for you to find the IP of your machine remotely if it got disconnected and had to reconnect automatically? Or maybe there is a way for OSX to get its own current IP and send it to you by email, etc each time it starts a new connection?



[ Reply to This | # ]
Re: Related question
Authored by: Darkshadow on Sep 05, '01 09:46:59PM
I don't know how to get the address directly, but I know of a way. If you use PPP, you can use this to get the IP:
  • netstat -nI ppp0 | while read a b c d e; do echo $d | grep [.]; done (There should be a forward slash before the dot there, but the board edited it out)
If you use something via Ethernet, you can do this one:
  • netstat -nI en0 | while read a b c d e; do echo $d | grep -v [A-z]; done
(I use PPP, so the second one is largely untested. It'll work fine as long as whatever method you are signing on with actually changes the ethernet port's IP address) Note that those are capital i's, not lowercase L's (netstat -nI). You could set either of those up as a cron job to have it email the IP address to you (as long as you have sendmail working to sending to email addresses outside your local network).

[ Reply to This | # ]
Related question [finding IP]
Authored by: Anonymous on Sep 06, '01 03:37:32AM

I use DYNDNS.org for this. It works great. You merely sign up for a free (donations accepted) account. It will be 'username.dyndns.org' when you want to reach it. (with "username" being whatever you choose when signing up.) Prior set-up of a dynamic dns client is required. I highly recommend DNSUpdate (by Julien Jalon) -- can be found at: http://mapage.noos.fr/jalon/ (last time I checked.)

After a simple configuration of the client -- fire up the daemon with a nice cocoa gui ... and there ya go. Any time you want to remotely reach your dyndns box, key in, for example "telnet username.dyndns.org" and it will resolve to your constantly updated IP if the DNSUpdate is configured and working correctly. Good Luck.



[ Reply to This | # ]
Related question [finding IP]
Authored by: ths on Sep 06, '01 05:52:13PM

This was a really great tip! I just signed up for dyndns.org and installed the also great and simple to use DNSUpdate. My question is now how to make Apache work over dyndns.org. After turning all the sharing options in the sharing panel I can telnet and ftp to my new host but when I try to access it by WWW I get Apache's "not properly configured" page. The rudimentary index.html in my Sites folder states that I should see an address next to Network Identity in the sharing panel but there is none and neither is there an IP. Typing in my dyndns.org host name doesn't help either. Any ideas?



[ Reply to This | # ]
Related question
Authored by: owain_vaughan on Sep 06, '01 06:25:42AM

How about:

ifconfig ppp0 | grep inet | awk '{ print $2 }'



[ Reply to This | # ]
Try: IP Reporter
Authored by: eriks on Sep 06, '01 03:34:12PM

Try IP Reporter, it will send you an email (to an html based email service) if your IP address has changed.
You'll get it on:
http://members.home.nl/vissering

eriks



[ Reply to This | # ]