|
| | |||||||
| Apple Macintosh Hardware Discuss the Apple Macintosh Hardware |
| | LinkBack | Thread Tools |
| |||
| Need a piece of code (or Applescript or whatever) to repeatedlydump my dynamic IP address to an FTP site I'm a biologist with a number of Macs in the lab running OS X. One of my Macs has a static IP address, so I can access it from home. The others have dynamic addresses. I figure, one way for me to access them from home is to run a little program on each one which would, every 30 minutes or so, open an FTP connection to my static Mac and dump their name and current IP address to a 1-line file (replacing the old one). That way, all I have to do is log onto my static Mac, check the files, and find the current IP address of each of my machines. If anyone has a better scheme, I'd love to hear it. Otherwise, does anyone have or know of a code snippet like this? I know it's probably not too tough to write; somewhere there must be a public-domain C library which implements FTP client-side functions. Or perhaps there's a quick Perl script around which does this. Can anyone help? -- Mike Levin mlevin77@comcast.net |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site In article <BD31516E.1B583%mlevin77@comcast.net>, Michael Levin <mlevin77@comcast.net> wrote: > I'm a biologist with a number of Macs in the lab running OS X. One of my > Macs has a static IP address, so I can access it from home. The others have > dynamic addresses. I figure, one way for me to access them from home is to > run a little program on each one which would, every 30 minutes or so, open > an FTP connection to my static Mac and dump their name and current IP > address to a 1-line file (replacing the old one). That way, all I have to do > is log onto my static Mac, check the files, and find the current IP address > of each of my machines. If anyone has a better scheme, I'd love to hear it. > Otherwise, does anyone have or know of a code snippet like this? I know it's > probably not too tough to write; somewhere there must be a public-domain C > library which implements FTP client-side functions. Or perhaps there's a > quick Perl script around which does this. Can anyone help? You don't say who issues the dynamic IP addresses. If they are being issued by an ISP, you can use a service like DynDns (<http://www.dyndns.org/services/dyndns/> to register a domain name and download a client which will keep the mapping up to date. If the dynamic IP addresses are issued by a local router, you will have to configure the router to map selected ports through to the target machines. Specifics of the mapping are router dependent. -- There are 10 kinds of people in the world: those who understand binary, and those who don't. Tom Stiller PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site In article <BD31516E.1B583%mlevin77@comcast.net>, Michael Levin <mlevin77@comcast.net> wrote: > I'm a biologist with a number of Macs in the lab running OS X. One of my > Macs has a static IP address, so I can access it from home. The others have > dynamic addresses. I figure, one way for me to access them from home is to > run a little program on each one which would, every 30 minutes or so, open > an FTP connection to my static Mac and dump their name and current IP > address to a 1-line file (replacing the old one). That way, all I have to do > is log onto my static Mac, check the files, and find the current IP address > of each of my machines. If anyone has a better scheme, I'd love to hear it. > Otherwise, does anyone have or know of a code snippet like this? I know it's > probably not too tough to write; somewhere there must be a public-domain C > library which implements FTP client-side functions. Or perhaps there's a > quick Perl script around which does this. Can anyone help? http://no-ip.com http://dyndns.org If these are real IP addresses (not the hidden non-routing addresses), then you should be able to use either No-IP.com or DynDNS.org to get a free DNS name and a utility to run on your Macs that will update No-IP.com or DynDNS.org as to what your current IP address is. I happen to use No-IP.com on my Mom's iMac. I then ssh tunnel into her system and run OSXvnc and Chicken of the VNC to manage her system remotely. Now if you are using a non-routing DHCP address, such as 192.168.*.*, or 10.*.*.*, then No-IP and DynDNS would only find your router's internet connection IP address. This can still be used to some advantage if you have your router forward explicit ports to your individual Macs. For example port 22 is the SSH port, you could have different ports forwarded for each machine, and then arrange for those ports to be monitored on your Macs as SSH connections. Once you ssh log into the system you can get your current non-routing IP address that way. Bob Harris |
| |||
| Re: Need a piece of code (or Applescript or whatever) torepeatedly dump my dynamic IP address to an FTP site On 7/31/04 12:58 PM, in article harris-3096A3.13582531072004@cacnews.cac.cpqcorp.net, "Bob Harris" <harris@zk3.dec.com> wrote: > In article <BD31516E.1B583%mlevin77@comcast.net>, > Michael Levin <mlevin77@comcast.net> wrote: > >> I'm a biologist with a number of Macs in the lab running OS X. One of my >> Macs has a static IP address, so I can access it from home. The others have >> dynamic addresses. I figure, one way for me to access them from home is to >> run a little program on each one which would, every 30 minutes or so, open >> an FTP connection to my static Mac and dump their name and current IP >> address to a 1-line file (replacing the old one). That way, all I have to do >> is log onto my static Mac, check the files, and find the current IP address >> of each of my machines. If anyone has a better scheme, I'd love to hear it. >> Otherwise, does anyone have or know of a code snippet like this? I know it's >> probably not too tough to write; somewhere there must be a public-domain C >> library which implements FTP client-side functions. Or perhaps there's a >> quick Perl script around which does this. Can anyone help? > > http://no-ip.com > http://dyndns.org > > If these are real IP addresses (not the hidden non-routing addresses), > then you should be able to use either No-IP.com or DynDNS.org to get a > free DNS name and a utility to run on your Macs that will update > No-IP.com or DynDNS.org as to what your current IP address is. > > I happen to use No-IP.com on my Mom's iMac. I then ssh tunnel into her > system and run OSXvnc and Chicken of the VNC to manage her system > remotely. > > Now if you are using a non-routing DHCP address, such as 192.168.*.*, or > 10.*.*.*, then No-IP and DynDNS would only find your router's internet > connection IP address. This can still be used to some advantage if you > have your router forward explicit ports to your individual Macs. For > example port 22 is the SSH port, you could have different ports > forwarded for each machine, and then arrange for those ports to be > monitored on your Macs as SSH connections. Once you ssh log into the > system you can get your current non-routing IP address that way. > > Bob Harris I am a LAN Manager at Vanderbilt University Medical Center. Unless your DHCP server is set up differently, your computers will retain their IP addresses indefinitely. Ours actually has a "lease" time of three days, but if the computer remains on, it retains the same IP. -- Brian Ehni |
| |||
| Re: Need a piece of code (or Applescript or whatever) torepeatedly dump my dynamic IP address to an FTP site On 7/31/04 1:49 PM, in article tomstiller-C55B10.13494731072004@com...a.giganews.com, "Tom Stiller" <tomstiller@comcast.net> wrote: > In article <BD31516E.1B583%mlevin77@comcast.net>, > Michael Levin <mlevin77@comcast.net> wrote: > >> I'm a biologist with a number of Macs in the lab running OS X. One of my >> Macs has a static IP address, so I can access it from home. The others have >> dynamic addresses. I figure, one way for me to access them from home is to >> run a little program on each one which would, every 30 minutes or so, open >> an FTP connection to my static Mac and dump their name and current IP >> address to a 1-line file (replacing the old one). That way, all I have to do >> is log onto my static Mac, check the files, and find the current IP address >> of each of my machines. If anyone has a better scheme, I'd love to hear it. >> Otherwise, does anyone have or know of a code snippet like this? I know it's >> probably not too tough to write; somewhere there must be a public-domain C >> library which implements FTP client-side functions. Or perhaps there's a >> quick Perl script around which does this. Can anyone help? > > You don't say who issues the dynamic IP addresses. If they are being > issued by an ISP, you can use a service like DynDns > (<http://www.dyndns.org/services/dyndns/> to register a domain name and > download a client which will keep the mapping up to date. If the > dynamic IP addresses are issued by a local router, you will have to > configure the router to map selected ports through to the target > machines. Specifics of the mapping are router dependent. they're issued by our system administrator - the building is on a T1 line, and they have a server which hands out IP addresses to any machines plugged into the ethernet. Actually, I already have my own domain name registered. Is that sufficient for DYNDNS or do I have to pay them again? Does their client run on OS X? The port mapping is an issue - I forgot about it. I guess I have to ask our sysadmin... -- Mike Levin mlevin77@comcast.net |
| |||
| Re: Need a piece of code (or Applescript or whatever) torepeatedly dump my dynamic IP address to an FTP site On 7/31/04 1:58 PM, in article harris-3096A3.13582531072004@cacnews.cac.cpqcorp.net, "Bob Harris" <harris@zk3.dec.com> wrote: > In article <BD31516E.1B583%mlevin77@comcast.net>, > Michael Levin <mlevin77@comcast.net> wrote: > >> I'm a biologist with a number of Macs in the lab running OS X. One of my >> Macs has a static IP address, so I can access it from home. The others have >> dynamic addresses. I figure, one way for me to access them from home is to >> run a little program on each one which would, every 30 minutes or so, open >> an FTP connection to my static Mac and dump their name and current IP >> address to a 1-line file (replacing the old one). That way, all I have to do >> is log onto my static Mac, check the files, and find the current IP address >> of each of my machines. If anyone has a better scheme, I'd love to hear it. >> Otherwise, does anyone have or know of a code snippet like this? I know it's >> probably not too tough to write; somewhere there must be a public-domain C >> library which implements FTP client-side functions. Or perhaps there's a >> quick Perl script around which does this. Can anyone help? > > http://no-ip.com > http://dyndns.org > > If these are real IP addresses (not the hidden non-routing addresses), > then you should be able to use either No-IP.com or DynDNS.org to get a > free DNS name and a utility to run on your Macs that will update > No-IP.com or DynDNS.org as to what your current IP address is. > > I happen to use No-IP.com on my Mom's iMac. I then ssh tunnel into her > system and run OSXvnc and Chicken of the VNC to manage her system > remotely. > > Now if you are using a non-routing DHCP address, such as 192.168.*.*, or > 10.*.*.*, then No-IP and DynDNS would only find your router's internet > connection IP address. This can still be used to some advantage if you > have your router forward explicit ports to your individual Macs. For > example port 22 is the SSH port, you could have different ports > forwarded for each machine, and then arrange for those ports to be > monitored on your Macs as SSH connections. Once you ssh log into the > system you can get your current non-routing IP address that way. > > Bob Harris Great - thanks!! -- Mike Levin mlevin77@comcast.net |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site In article <BD316A0F.1B65B%mlevin77@comcast.net>, Michael Levin <mlevin77@comcast.net> wrote: > On 7/31/04 1:49 PM, in article > tomstiller-C55B10.13494731072004@com...a.giganews.com, "Tom Stiller" > <tomstiller@comcast.net> wrote: > > > In article <BD31516E.1B583%mlevin77@comcast.net>, > > Michael Levin <mlevin77@comcast.net> wrote: > > > >> I'm a biologist with a number of Macs in the lab running OS X. One > >> of my Macs has a static IP address, so I can access it from home. > >> The others have dynamic addresses. I figure, one way for me to > >> access them from home is to run a little program on each one which > >> would, every 30 minutes or so, open an FTP connection to my static > >> Mac and dump their name and current IP address to a 1-line file > >> (replacing the old one). That way, all I have to do is log onto my > >> static Mac, check the files, and find the current IP address of > >> each of my machines. If anyone has a better scheme, I'd love to > >> hear it. Otherwise, does anyone have or know of a code snippet > >> like this? I know it's probably not too tough to write; somewhere > >> there must be a public-domain C library which implements FTP > >> client-side functions. Or perhaps there's a quick Perl script > >> around which does this. Can anyone help? > > > > You don't say who issues the dynamic IP addresses. If they are being > > issued by an ISP, you can use a service like DynDns > > (<http://www.dyndns.org/services/dyndns/> to register a domain name and > > download a client which will keep the mapping up to date. If the > > dynamic IP addresses are issued by a local router, you will have to > > configure the router to map selected ports through to the target > > machines. Specifics of the mapping are router dependent. > > they're issued by our system administrator - the building is on a T1 line, > and they have a server which hands out IP addresses to any machines plugged > into the ethernet. Actually, I already have my own domain name registered. > Is that sufficient for DYNDNS or do I have to pay them again? Does their > client run on OS X? The port mapping is an issue - I forgot about it. I > guess I have to ask our sysadmin... I guess the real question is: given the current IP address of one of the machines in question, can you connect to it from home? If the answer is yes, then registration with a service like dyndns and running an available client on the target machine to keep the mapping up to date is all that is required. If you can't access the target machine via its (known) IP address, you will have to negotiate with your sysadmin to provide the appropriate routing. -- There are 10 kinds of people in the world: those who understand binary, and those who don't. Tom Stiller PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site Michael Levin <mlevin77@comcast.net> wrote: > Is that sufficient for DYNDNS or do I have to pay them again? No, their service is free if you accept one of their own domains, see: <http://www.dyndns.org/services/dyndns/domains.html> it's free for up to 5 names... HC |
| |||
| Re: Need a piece of code (or Applescript or whatever) torepeatedly dump my dynamic IP address to an FTP site On 7/31/04 4:12 PM, in article tomstiller-7D8CF5.16125231072004@com...a.giganews.com, "Tom Stiller" <tomstiller@comcast.net> wrote: > In article <BD316A0F.1B65B%mlevin77@comcast.net>, > Michael Levin <mlevin77@comcast.net> wrote: > >> On 7/31/04 1:49 PM, in article >> tomstiller-C55B10.13494731072004@com...a.giganews.com, "Tom Stiller" >> <tomstiller@comcast.net> wrote: >> >>> In article <BD31516E.1B583%mlevin77@comcast.net>, >>> Michael Levin <mlevin77@comcast.net> wrote: >>> >>>> I'm a biologist with a number of Macs in the lab running OS X. One >>>> of my Macs has a static IP address, so I can access it from home. >>>> The others have dynamic addresses. I figure, one way for me to >>>> access them from home is to run a little program on each one which >>>> would, every 30 minutes or so, open an FTP connection to my static >>>> Mac and dump their name and current IP address to a 1-line file >>>> (replacing the old one). That way, all I have to do is log onto my >>>> static Mac, check the files, and find the current IP address of >>>> each of my machines. If anyone has a better scheme, I'd love to >>>> hear it. Otherwise, does anyone have or know of a code snippet >>>> like this? I know it's probably not too tough to write; somewhere >>>> there must be a public-domain C library which implements FTP >>>> client-side functions. Or perhaps there's a quick Perl script >>>> around which does this. Can anyone help? >>> >>> You don't say who issues the dynamic IP addresses. If they are being >>> issued by an ISP, you can use a service like DynDns >>> (<http://www.dyndns.org/services/dyndns/> to register a domain name and >>> download a client which will keep the mapping up to date. If the >>> dynamic IP addresses are issued by a local router, you will have to >>> configure the router to map selected ports through to the target >>> machines. Specifics of the mapping are router dependent. >> >> they're issued by our system administrator - the building is on a T1 line, >> and they have a server which hands out IP addresses to any machines plugged >> into the ethernet. Actually, I already have my own domain name registered. >> Is that sufficient for DYNDNS or do I have to pay them again? Does their >> client run on OS X? The port mapping is an issue - I forgot about it. I >> guess I have to ask our sysadmin... > > I guess the real question is: given the current IP address of one of the > machines in question, can you connect to it from home? If the answer is > yes, then registration with a service like dyndns and running an > available client on the target machine to keep the mapping up to date is > all that is required. If you can't access the target machine via its > (known) IP address, you will have to negotiate with your sysadmin to > provide the appropriate routing. right. Worst comes to worst, what I'll do is ssh in to the static machine (which I know I can do), and from there, ssh to the other machines, once I know what their address is. That should get around the port rules and firewall business, right? -- Mike Levin mlevin77@comcast.net |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site In comp.sys.mac.system Michael Levin <mlevin77@comcast.net> exponit: > I'm a biologist with a number of Macs in the lab running OS X. One of my > Macs has a static IP address, so I can access it from home. The others have > dynamic addresses. I figure, one way for me to access them from home is to > run a little program on each one which would, every 30 minutes or so, open > an FTP connection to my static Mac and dump their name and current IP > address to a 1-line file (replacing the old one). That way, all I have to do > is log onto my static Mac, check the files, and find the current IP address > of each of my machines. If anyone has a better scheme, I'd love to hear it. > Otherwise, does anyone have or know of a code snippet like this? I know it's > probably not too tough to write; somewhere there must be a public-domain C > library which implements FTP client-side functions. Or perhaps there's a > quick Perl script around which does this. Can anyone help? In our lab here at UC Davis, we run our own network, using the university-assigned IP as a gateway. If you want to access the network easily from home, you can simply tunnel in through the gateway & your home machine is "in" the lab network. We use FreeBSD in our gateway machine, but I'm confident that it could be done just as well with an OS/X machine. Greg Shenaut |
| |||
| Re: Need a piece of code (or Applescript or whatever) torepeatedly dump my dynamic IP address to an FTP site On 7/31/04 6:29 PM, in article 1ghtag9.l5d14z1tpq246N%bounce.this@rude.com, "Hugh Chaloner" <bounce.this@rude.com> wrote: > Michael Levin <mlevin77@comcast.net> wrote: > >> Is that sufficient for DYNDNS or do I have to pay them again? > > No, their service is free if you accept one of their own domains, see: > > <http://www.dyndns.org/services/dyndns/domains.html> > > it's free for up to 5 names... > > HC ah, cool! Now, several people have pointed out that due to our firewall, I may not be able to get to the dynamic IP machines from outside anyway. This is true. So, my plan now is to ssh in to the static machine, and knowing the IP address of the others, ssh to them from inside. Sounds like it should work. The question is: does the client software I just downloaded from DYNDNS help me with that or does it only work directly with the DYNDNS service (which I guess I can't use, since the machines won't be allowed direct contact from outside)? What exactly does their client software do - where does it put the IP address info? -- Mike Levin mlevin77@comcast.net |
| |||
| Re: Need a piece of code (or Applescript or whatever) torepeatedly dump my dynamic IP address to an FTP site On 7/31/04 7:08 PM, in article ceh8ps$t2a$1@woodrow.ucdavis.edu, "Greg Shenaut" <gkshenaut@ucdavis.edu> wrote: > In comp.sys.mac.system Michael Levin <mlevin77@comcast.net> exponit: >> I'm a biologist with a number of Macs in the lab running OS X. One of my >> Macs has a static IP address, so I can access it from home. The others have >> dynamic addresses. I figure, one way for me to access them from home is to >> run a little program on each one which would, every 30 minutes or so, open >> an FTP connection to my static Mac and dump their name and current IP >> address to a 1-line file (replacing the old one). That way, all I have to do >> is log onto my static Mac, check the files, and find the current IP address >> of each of my machines. If anyone has a better scheme, I'd love to hear it. >> Otherwise, does anyone have or know of a code snippet like this? I know it's >> probably not too tough to write; somewhere there must be a public-domain C >> library which implements FTP client-side functions. Or perhaps there's a >> quick Perl script around which does this. Can anyone help? > > In our lab here at UC Davis, we run our own network, using the > university-assigned IP as a gateway. If you want to access the > network easily from home, you can simply tunnel in through the > gateway & your home machine is "in" the lab network. > > We use FreeBSD in our gateway machine, but I'm confident that it > could be done just as well with an OS/X machine. > > Greg Shenaut Yep - that's my plan now, I can use ssh. But, once I get into the gateway machine, I still somehow need to know the IP address currently owned by the box I'm trying to get to. I am looking for a simple way to have my lab machines save their IP addresses to a file on the gateway. -- Mike Levin mlevin77@comcast.net |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site Michael Levin <mlevin77@comcast.net> wrote: > Now, several people have pointed out that due to our firewall, I > may not be able to get to the dynamic IP machines from outside anyway. But I thought you said you could login to your work machine remotely - earlier in the thread? If this is the case, then the firewall has already allowed you through. Is the static machine (you were talking about earlier) behind the firewall? > So, my plan now is to ssh in to the static machine, and knowing the > IP address of the others, ssh to them from inside. Are you using X11? you can do all sorts of fancy tunnelling with ssh & X11. > Sounds like it should > work. The question is: does the client software I just downloaded from > DYNDNS help me with that or does it only work directly with the DYNDNS > service (which I guess I can't use, since the machines won't be allowed > direct contact from outside)? What exactly does their client software do - > where does it put the IP address info? There are extensive FAQs on the dyndns site which may answer your questions. I'm not sure i understand them completely. Your machines will appear as ONE ip address to the outside world - that will be the ip of your router / firewall. HC |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site In article <1ghtduz.nwse0ri9g73aN%bounce.this@rude.com>, Hugh Chaloner <bounce.this@rude.com> wrote: > Michael Levin <mlevin77@comcast.net> wrote: > > > Now, several people have pointed out that due to our firewall, I > > may not be able to get to the dynamic IP machines from outside anyway. > > But I thought you said you could login to your work machine remotely - > earlier in the thread? If this is the case, then the firewall has > already allowed you through. Is the static machine (you were talking > about earlier) behind the firewall? No. If I remember correctly, he has access to one machine with a static address, and would like to access others which have locally assigned dynamic addresses. Rob. |
| |||
| Re: Need a piece of code (or Applescript or whatever) to repeatedly dump my dynamic IP address to an FTP site In article <BD319D99.1B67A%mlevin77@comcast.net>, Michael Levin <mlevin77@comcast.net> wrote: > right. Worst comes to worst, what I'll do is ssh in to the static machine > (which I know I can do), and from there, ssh to the other machines, once I > know what their address is. That should get around the port rules and > firewall business, right? That will work and that brings us back to your original question. Maybe the simplest gimmick is to have the target machine email its IP address to the known machine where it can be read in the first hop and used to complete the second hop. -- There are 10 kinds of people in the world: those who understand binary, and those who don't. Tom Stiller PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Web Site address | artistic | Microsoft Office | 2 | 03-04-2008 01:10 PM |
| web site address - cookie | leobis | Internet Explorer | 1 | 08-28-2007 04:00 AM |
| IE7 crash when I type in site address | tim | Internet Explorer | 1 | 05-06-2007 08:44 AM |
| How to make function key run an AppleScript in OS X (Panther)? | Michael Levin | Apple Macintosh Hardware | 0 | 02-06-2007 04:47 PM |
| Dynamic IP address with Portege 3500 | Christophe Alviset | Windows XP Tablet PC Newsgroup | 13 | 10-13-2004 01:15 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |