Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

innominato5090

macrumors 6502
Original poster
Sep 4, 2009
453
71
hi guys! hope I've chosen the right section to start this new thread.
I'm looking for a solution to save the external ip address into a file on my dropbox folder, so I can easily read it from my MacBook when I'm not at home or on my iPhone and access via VNC to my Mac at home.
I think that an applescript that runs in background and constantly update the ip (like every hour) should be the right solution but I can't figure how to create it! I'm quite a dumb with apple script editor, so an help would be highly appreciated! :D

Luca
 
How about registering for a free account from DynDNS.org? Then you just run a client and you can get something like:

<yourname>.dyndns.org
<yourname>.homeunix.com

You can replace <yourname> with anything you want, so long as nobody else is using it.
 
How about registering for a free account from DynDNS.org? Then you just run a client and you can get something like:

<yourname>.dyndns.org
<yourname>.homeunix.com

I don't think that updates when your IP changes. So it'll break.

I've actually thought of this. But I haven't been able to successfully upload data to my webhost via ftp in terminal.

In any case, I'll post the method in the hopes someone will help both of us out: THIS IS NOT A SOLUTION (yet)

You can either run a chron job in terminal OR download NerdTool here. Open it, and create a new shell item.

In that shell item you wil need to have the script for: writing a file of your ip to somewhere (hidden)

Code:
curl --silent www.whatismyip.com/automation/n09230945.asp > /tmp/myip
will grab your IP and store it in plain text.

Now you could also include it to only update and upload when it's different.

This is where someone comes in and tells us how to use ftp in the shell to upload to a protected directory.
 
I don't think that updates when your IP changes. So it'll break.

Well, if you check out the site, it explains what it does (dynamic DNS). You have a client on the inside network updating the DNS entry, so it is updated whenever the IP changes. I do this all the time.

Don't re-invent the wheel. A hostname is much easier to remember than constantly having to check the IP.
 
How about registering for a free account from DynDNS.org? Then you just run a client and you can get something like:

<yourname>.dyndns.org
<yourname>.homeunix.com

You can replace <yourname> with anything you want, so long as nobody else is using it.

that's a fantastic idea! actually my netgear that i use as modem (connected with my time capsule) has built-in dyndns support!
I'll will try later, thank you very much!
 
that's a fantastic idea! actually my netgear that i use as modem (connected with my time capsule) has built-in dyndns support!
I'll will try later, thank you very much!

You're welcome. FYI, don't have the built-in client update too often or they will disable your account. You just need to email them to re-enable, but just something to keep in mind.

My Linksys running OpenWRT has the built-in client too and it works fine.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.