Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just moved into a new place, and hoped beyond hope that I could get DSL. No dice. So, I'm stuck with cable. Anyway, I have a personal chatroom and webcam on my server, and also use it as a Squid gateway from work. All of this functioning is dependent on me having my home IP address.
When I got the server online last week I was thrilled to see that I had a relatively easy-to-memorize IP addie, and I ran with it. Well, midday today for no apparent reason (server certainly wasn't cycled) the IP changed completely to a horrible number. Comcast didn't used to do this to me, and hopefully this is just a freak thing.
In the event that it isn't, I am curious about what sort of options there are out there to get a server (running Mandrake 9.1) to report changes in IP address, either via email or via FTP upload to another address. I don't recall seeing anything out there, and I'm not qualified enough to be able to script up my own little program to do it.
Thanks for any and all feedback you can provide. I suppose I could keep having my wife email me to get the new IP, but I'd like to find something more automated.
#making my html page
#
echo "
<html>
<head><title>Home for MyDomain.com</title></head>
<body>
<P><center><H1>Welcome to the homepage of MyDomain</H1>
<P><img src=\"MyPicture.jpg\">
<P><a href=\"http://"$IPADDR\""><H1>Click here to enter...</H1></center></
a>
</BODY>
</HTML>
" > /etc/default.html
#sending it into my static server
#
ncftpput -u MyUsername -p MyPassword MyDomain.com / /etc/default.html
Keep in mind that I know next to NOTHING about scripting and HTML coding.. but this is simple enough and it works for me. Anyone with improvments upon the process... feel free to post.
You might also want to look at http://www.dyndns.org - I used to use one of their domains to follow around my dynamic cable modems address. I ran a script that would detect any change in IP address and update DynDNS as necessary.
I don't use the update script anymore as I've got a static IP now, but I was just running a script from cron even 5 mins or so. I'll have a dig around and see what client I was using.
On the off chance that you have a Home NAT Router, many of them have builtin support for Dynamic DNS and will report the IP automatically.
I run an FTP/HTTP box behind a NAT router with dynamic IP. I don't have a domain name, so what I did was to register a fortunecities webpage for free, then I wrote a shell script that can automatically check the IP by logging into my router. It then uploads a simple redirect page on the fortunecities website. I run it as a cron job hourly, though my IP doesn't change unless the modem is reset.
Of course, you can get your IP address from the Linux box if it is connected directly to the cable modem and do the same thing.
If you do have a domain addy already, check DynDNS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.