Apache with a dynamic IP address

Apache with a dynamic IP address

Post by Bruce E. Harr » Fri, 01 Jan 1999 04:00:00



Sometime ago I had a program for OS/2 that would automatically find
and ftp my current IP address to a web page hosted at my ISP.  If I
was on line any visitor could click on that link and connect with my
server. The program was called "Poor Man's Web Server". It was a
simple REXX script that just found and ftped the dynamic IP. I used an
native OS/2 web server at that time.

I have since moved onto Linux and I am wondering if there is such a
program or method for Linux with Apache?

TIA

Bruce

 
 
 

Apache with a dynamic IP address

Post by Pasha Zusmanovic » Thu, 07 Jan 1999 04:00:00



> Sometime ago I had a program for OS/2 that would automatically find
> and ftp my current IP address to a web page hosted at my ISP.  If I
> was on line any visitor could click on that link and connect with my
> server. The program was called "Poor Man's Web Server". It was a
> simple REXX script that just found and ftped the dynamic IP. I used an
> native OS/2 web server at that time.

> I have since moved onto Linux and I am wondering if there is such a
> program or method for Linux with Apache?

Method, method, of course... Everything is ready, no need for special
program :). It can be done in a variety of ways. Also it has nothing to
do with apache per se. Here what I am doing (I admit that it's rather
quick and dirty than error-prone...):

file /etc/ppp/ip-up:
#!/bin/sh
STATUS_FILE = /etc/ppp/status.html
/usr/local/sbin/gen-status.pl -v -s up -f $STATUS_FILE -i $4
if [ $? -eq 1 ]; then
   /usr/local/sbin/batchftp <ISP_site> $STATUS_FILE status.html
fi

file /usr/local/sbin/ppp-off:
#!/bin/sh
STATUS_FILE=/etc/ppp/staus.html
/usr/local/sbin/gen-status.pl -v -s down -f $STATUS_FILE
if [ $? -eq 1 ]; then
    /usr/local/sbin/batchftp <ISP_site> $STATUS_FILE status.html
fi
... and then usual ppp-off stuff...

file /usr/local/sbin/batchftp:
#!/bin/sh
if [ $# -lt 3]; then
    echo Usage: $0 ftp.site.com local/file/name remote/file/name
    exit -1
fi
/bin/ftp -n -v $1 << EOF
user <user_name> <password>
ascii
put $2 $3
bye
EOF

and gen-status.pl is a perl script which format a small HTML page with
ip address supplied as parameter.

Hope this helps.
--
Pasha Zusmanovich    -------o x x "What i tell you three times is true."

www.actcom.co.il/~pasha     x x o---------------------------------------

 
 
 

1. dynamic ip address - how to get to know my ip address?

Hi there,

my ISP provides me with a dynamic ip address. I'm using a wireless LAN
router made by SMC to connect to the internet. I want to get to know the
public ip address from a computer that is located in the local network
behind the router's firewall. But, of course, the router's NAT replaces the
public ip address with the local one.

How do I get to know the public ip address the ISP gave me?

Currently, I'm not using Linux. But I consider to set up a Linux box that
will be accessible from the internet. I guess, this problem is not
platform-dependent. Unfortunately, my router does not have a telnet
interface or any other interface that would provide me with the public ip
address. Only, if login to the web interface manually, I can see the current
status including the current ip address.

Can I solve this problem with standard TCP/IP tools? "ping" does not give
any evidence -- I was sniffing with Ethereal to miss no information.

Do I need help from an external system that can tell me my ip address? Is
there a service, I can use?

Thanks in advance,

Johannes

2. XFree4.0: Imwheel Doesn't Work Now

3. HELP: Apache and address mapping and Dynamic IP

4. Help: X11R6 on a IBM PS/VP with S3 86C805 and an EIZO monitor

5. Q: connet to my APACHE server with the dynamic IP address

6. Netscape 4.78 vs 7.0

7. Dynamic IP address with Apache Web server Help

8. sendfax + modem TRUST 28K8

9. Using apache with dynamic IP address

10. Apache with dynamic IP addresses

11. replace dynamic ip address in html file with new address

12. Static IP address from Dynamic IP

13. tcp/ip with dynamic ip addressing?