LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-01-2002, 09:45 PM   #1
thep
Member
 
Registered: Apr 2001
Location: Bangkok, Thailand
Distribution: RH8(server)
Posts: 65

Rep: Reputation: 15
Question Dynamic IP address web server


HI, no i'm useing RH7.1, with ADSL
thing i 'd like to do is to get inet address from ppp0
them FTP it to some where..

but i dont know shell command to get IP and then ftp it to somewhere.

ANyone know , help plz
thank you
theppadon

 
Old 08-02-2002, 12:28 AM   #2
krunkwick
Member
 
Registered: Jun 2002
Location: Memphis
Distribution: Suse 8.0 Pro
Posts: 45

Rep: Reputation: 15
I hope this helps:

Look at some firewall scripts or run a search on google for ipaddress scripts. You should be able to come across some working examples.

I havent really ever used FTP from linux, but I'm sure that you can do everything from one command.

In bash-scripting you can easily redirect output to a file such as:
$IPADDRESS > /root/IPinfo.txt

At www.linuxguruz.org they have some firewall scripts that get the ipaddress through scripting. Use some of that to get the ipaddress to a variable and then write it to a file. Then add a command to FTP that file to where ever you want.

Just run the ftp command with --help argument to get your switches and args to include in the command.
 
Old 08-02-2002, 01:18 AM   #3
thep
Member
 
Registered: Apr 2001
Location: Bangkok, Thailand
Distribution: RH8(server)
Posts: 65

Original Poster
Rep: Reputation: 15
those thing is my question, i cant find it
 
Old 08-02-2002, 09:22 AM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
IP="`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
 
Old 08-02-2002, 08:49 PM   #5
thep
Member
 
Registered: Apr 2001
Location: Bangkok, Thailand
Distribution: RH8(server)
Posts: 65

Original Poster
Rep: Reputation: 15
yes that 's working,
i thought have to go something with sbin/ifconfig ppp0
before, i ask for another way, anyway thank you neo77777

how about BASH for auto send ftp to server
i really dont know much about BASH, thank you
 
  


Reply



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
Fake Web Address on Local Server Rundi Linux - Networking 9 06-28-2005 05:08 PM
How do I setup a web server? using a dynamic IP? cwolf78 Linux - Software 2 05-14-2005 05:09 PM
Setting up a web server with Dynamic IP amOrpheus Linux - Newbie 3 01-07-2004 08:37 PM
What is the slickest way to use a dynamic ip address for a server? lostboy Linux - General 7 07-05-2003 10:56 PM
Web server with dynamic IP bripage Linux - Networking 2 01-19-2003 11:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:46 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