[lug] Auto FTP file up on PPP connection

Mark (Andy) Jolley majolley at qwest.net
Wed May 16 21:28:14 MDT 2001


Well, here's the deal...
I currently have my linux box doing IPChains and MASQ to share my dialup, no
DSL, no Cable Modem, and after seeing some of the stuff here, I'm not to
sure of Sprint (WAY out east, I see Pena Blvd out my rear window, and my
house is kinda small).
Anyway... I want to play with Apache.  I'm very familiar with the M$ stuff
because of work, and I want to play with something else at home.  So what I
want to do is upload an HTML page to my free qwest area that redirects to my
apache box at home.  Since it's a dialup, my IP could change each time.  So
with the ip-up.local I was hoping to call my create file script  that greps
the ip address out of ifconfig (which works) then FTP it up to my qwest.net
home page area.  This way I can play and show what I've done to others for
suggestions (as long as I'm dialed in), without having to let people know my
IP address everytime, just send them to my free area from qwest.

when I've created my ip-up.local file, and placed it in the /etc/ppp
directory, done a chmod 755 on it, and added the line to call the script
that creates my file, the script that creates the file does not seem to run.
I know the create file script works, I can run it independantly.


"Mark (Andy) Jolley" wrote:
>
> I'm trying to get my dialup box to auto FTP a file to a server once the
PPP
> connection is up, so I actually have two questions (I'm on Red hat 7.0):
> 1) where do I add my script to make my scripts kick off upon a successful
> dialup and logon?  I looked at my ppp-up script in the /etc/ppp directory,
> but it said to use a ppp-up.local.  I couldn't find one, so I made one
with

That should be /etc/ppp/ip-up.local, and yes, it needs to be executable.  I
use
it to call out to a time server (Mom's cable-modem-connected Linux box) when
my
server dials up, so I know it will always have a pretty accurate clock.

Calvin

> 2) how do I automate the ftp process.  I'm more familiar with the M$ world
> and I can call a script with ftp -s filename to automate an FTP process,
how
> do I do this with Linux, and who is the user that it will run under?

Hmmm ... by default, it would be the root user.

I'm curious - what do you want it to do via FTP?  Download new files?  You
can
do that with ncftpget, if you have that installed on your Linux box.

Calvin





More information about the LUG mailing list