Advertisement

External IP change notice

Started by February 06, 2004 03:09 PM
5 comments, last by Fourty_Two 20 years, 7 months ago
I have a cable modem, and my ISP has this bad habit of changing my IP alot. This makes it difficult for me to telnet to my linux machine at home to work on things. I''d like to have the linux machine check the external IP address every 15-30 min and update a file on another server with the new IP. This probably wouldn''t be too hard if I was using the linux box as a router, but Right now it''s is behind a d-link wireless router. On the main status page for the router it displays the current external IP, but you have to log into the router to view this page. Is there anyway to have lynx, or some similar program, login and dump this info to a file for me to parse? I just can''t figure out how to get past the password. Any help would be great.
send a http request to http://www.whatismyip.com/ and read you ip from the html file it sends you maybe?

Or you could use something like www.dyndns.org, i use them and run a opensource cliend called ddclient, written in perl. It is started in the startupscript & runs in the background. It updates myadress.dyndns.org to automaticly point at my ip when it changes.

And its free, recomended.
Advertisement
You can setup a domain name for free here:
DynNDS
---Ranok---
My solution to this was to create a script that ran on my home computer. This script called a CGI script on my website, which recorded the public IP of my home box (the web server would see my public IP as it is on the public side of my NAT router. I could then access the IP from my website whenever I wanted to access my home machine.

i made a script called myip that contains this:

#!/bin/bash
wget --quiet -O - http://www.whatismyip.com | awk ''//{print $4}''

that spits out my ip to the shell -- just redirect that script into a file and bam -- your ip in file form
-PoesRaven
------
C-Junkie says: SOMEBODY FIX POES''S POST!

and somebody fix the darn forum. sheesh.

the thing that changes your IP address is your dhcp client. usually they have the ability to call a script when they get a new IP address, so hook onto that to respond to IP changes.
Advertisement
Good Lord!

By all means, DO NOT USE TELNET unless you absolutely HAVE to, it transmits passwords in plaintext, and your telnet sessions are clearly readable by any packet sniffer. Start using SSH now.

If you need to connect from a windows box, use Putty (free ssh client, simple .exe that doesn''t involve any installation or anything fancy, google for ''putty'')

aagh you hurt my brain when you said "telnet"

This topic is closed to new replies.

Advertisement