Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-21-2004, 09:27 PM   #16
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31

Ok, I figured out part of the first question:
Answer: Locke is an idiot ...

I was accessing serverinfo.php from my windows box on the web browser while using SSH to access serverinfo.php from my linux box with the curl statement. So REMOTE_ADDR is the right variable and I now understand why.
Old 07-22-2004, 12:43 AM   #17
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
Originally posted by JohnLocke
[ snip ]
Question 2:

Now I've got this working ... what should I be looking at to create something that will either
a) ftp a file to my static IP containing my dynamic IP that I've just received
b) write to a file on that static IP site (btw, controlled by someone else ... I simply have ftp access)

Another phrasing of that question: is there a way to hard code an ftp transfer of a file? I could make a script that opens ftp at the correct address ... but once ftp is open, I don't know how to use a script to write in password and username or the file transfer "put" process.
Perl LWP or thereabouts in Perl can do the likes of that. I'm not advanced enough so as to know how to do what you want though.

ip update client

Don't have to be written in Perl though. I came across some written in C language, for instance.

A freely avail one written in Perl. Perhaps look at its source code for howto ideas?

more of 'em.

Which dyn dns service do you subscribe to? as, if ya haven't, ya might check there too.

I'd put money on it that differences of how it's done exist as far as the updater from one to another for instance versus dyndns

I've been wanting a static IP for some time now. But haven't leapt into it, not yet.

I'd be curious to hear your experience. Gotta have/subscribe to one of them dyn dns services, right? Like or dyndns or ?

I get confused when I go to look at all of their web sites. They range from free on up in price. Free could have ads in some way.

Rather than me make all the mistakes -- I'd like to benefit from someone been down that road. Web site helpful on it etc.?

Thanks. Alan.
Old 07-22-2004, 05:08 PM   #18
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
She is solved and working!

So others can know what I did ... here it is:

First I created a script that I called "serverinfo.php" and uploaded that to my static IP server:
I next created an ftp script of events, called "ftp.scr":
put /var/www/scripts/dynIP.txt htdocs/dynIP.txt
Lastly, I created a script, "":
curl -s > dynIP.txt
cat ftp.scr | ftp > /dev/null
(yes, that's my current static IP, and yes, the website is currently a hack job ... give it time, I'm just starting. I needed /something/ to hold the domain! The full site should be up by the end of next month ... a cool preview is at ... but it's big)

and then added:
ln -s /var/www/scripts/ /etc/cron.hourly/
Done! I now have a text file that is uploaded to my server containing my dynamic IP on my local server. Now I can use this as a web storage medium in the least.

Thanks to everyone that was so much help in pointing me to what I needed to learn!


acummings / Alan ... as to which service I'm subscribed to, I use (as you can see above) PowWeb. Located conveniently at They've given us (I'm going to approximate as I don't remember exactly) 1Gb of space, a rediculously large amount of bandwidth to use, about 120 pop email addresses with smtp enabled for another 300 or so. The server can use apache, php, sql, as well as standards now like j and javascript, html/xml, cgi. Unlike the free servers, you're free to do what you like with it (and there's no adds). You can (and we do) have sections up that aren't linked anywhere on your site ... even host multiple sites under the same domain but with separate starting pages.

The only thing I've run into so far that I don't like is they don't use sftp ... which would have made my ftp question trivial. But ftp will work fine for the limited amount of file moving I need to do.

BTW, they give credit for references, so if you look at this one and decide you like it, mention my domain as a reference and we'll get a couple bucks in our account


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - serving to external hosts from a computer on my internal network Khang Linux - Networking 4 01-24-2005 06:10 PM
IP forwarding issue -- IP address of internal network menonrr Linux - Networking 4 09-14-2004 08:46 AM
SuSe 7.0 not communicating with Network (internal or external) jmnovak Linux - Networking 1 02-27-2002 12:52 PM
Sample Working ipchain that allows http,ftp,ssh for internal and external network munisp Linux - Networking 1 11-09-2001 06:49 PM
accessing box from internal network but not from external JereBear Linux - Networking 12 05-12-2001 02:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration