On June 27, 2003 09:56 am, Steve Cox - dig wrote: > Hi there, > This might be a little bit newbie, not sure. I want to keep an eye on my ip > address off my adsl line, as it changes I would like a scirpt to run, > basically uploading to a hosted out website. Currently I use a cron job > every 15 mins that checks if the current ip is the same as the last in > /var/log/syslog, if not then and only then upload it. I do not run any mail > services, I do however run apache live for webpages only. It is on a text > only machine, Mandrake9.1, P1 100mhz, that doubles as my gateway for small > lan at home. If anyone has pointers, please share. > > I dont really want to run dyndns just yet, but if this turns out to be the > best solution, then so be it, I will. > > Oh, I am more a user, and not so good at bash & scripting, so if there isnt > an easy way, dont worry, I'll go the dyndns route. > > Best regards > Steve Cox
Hi Steve. First of all you need to understand how adsl, and indeed all dynamic IP works. You are assigned an IP when you first connect to the server. Not log on, not do anything except connect. For the duration of the connection your IP doesn't change. So, if you don't turn off your computer/router combination the IP should never change. If you do the chances are you will get the same IP back again, though there's no guarantee of that. At no time during a connection will the IP ever change. It's theorectially possible, of course, but in all my years of supporting and installing adsl I have yet to see it. And the reason is fairly simple. To assign everyone a new IP the dynamic IP server would have to take down your connection and initiate another "handshake", then pass on the new IP, then, just to make sure it's you, ask for your password again. As a simple matter of customer relations telco's don't do this. Indeed, the telco will reserve the IP you already have for a period of up to 96 hours so that it can deal with such things as power failures either at the Central Office or in your area. You have to be shut down for quite some time before you'll get a new IP, as a rule. Running a cron job, as long as your connection stays up, is, then, a waste of time. If you want to check it do it immediately after bringing up the connection using ifconfig eth0/eth1 or whatever. BTW, restarting your network appears to have no affect..your IP will, 99.9999% of the time be correct. (Incidentially, this is how my home network works as well.) That said, I'm a bit unclear about what you're saying with respect to your web site. If you're hosting a web site on a dynamically allocated IP address you're asking, no begging, for trouble. Buck up for a fixed IP for that. ttfn John (Telco God, 3rd Class. :-) )
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
