LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-21-2004, 08:27 PM   #16
JohnLocke
Member
 
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-21-2004, 11:43 PM   #17
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
Quote:
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

http://www.google.com/search?hl=en&l...rl&btnG=Search

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

http://www.novajo.ca/easydns.html

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

http://www.dnsexit.com/Direct.sv?cmd=ipClients

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 no-ip.com 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 no-ip.com 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, 04:08 PM   #18
JohnLocke
Member
 
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:
Code:
<?php
echo $_SERVER["REMOTE_ADDR"];
?>
I next created an ftp script of events, called "ftp.scr":
Code:
put /var/www/scripts/dynIP.txt htdocs/dynIP.txt
bye
Lastly, I created a script, "serverpop.sh":
Code:
#!/bin/sh
curl -s http://www.ralinventions.com/serverinfo.php > dynIP.txt
cat ftp.scr | ftp ftp02.powweb.com > /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 www.ralinventions.com/ral.wmv ... but it's big)

and then added:
Code:
ln -s /var/www/scripts/serverpop.sh /etc/cron.hourly/serverpop.sh
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 www.powweb.com. 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
 
  


Reply


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 05:10 PM
IP forwarding issue -- IP address of internal network menonrr Linux - Networking 4 09-14-2004 07:46 AM
SuSe 7.0 not communicating with Network (internal or external) jmnovak Linux - Networking 1 02-27-2002 11:52 AM
Sample Working ipchain that allows http,ftp,ssh for internal and external network munisp Linux - Networking 1 11-09-2001 05:49 PM
accessing box from internal network but not from external JereBear Linux - Networking 12 05-12-2001 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:57 AM.

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