Ubuntu Server needs to inform me of a new IP address when it changes
I am running an Ubuntu gaming server on my home network, behind a router and firewall. My ISP is Verizon, and my external IP address changes from day to day, rarely going a week the same. This makes it difficult for other people to access my server consistently, and requires me to get a complaint, go home, check my IP, and then tell them all. Verizon doesn't think I pay enough to have a static IP, and I agree.
How can I get Ubuntu to check what the external IP is, and then forward that information in the form of a text or email if the results have changed? I have rudimentary Ubuntu skills, and my reaction was to write a script checking the IP and then sending the updated address to an (e)mailing list of recipients. I would then have cron run the script every ten minutes or so. 1: Is that idea feasible? 2: Would someone help me write that script if so? 3: What is a better idea? |
I use a similar script on a server at my house. There are a couple parts of the script that need to be set up first beforehand, like the mutt email program. Here is the script:
Code:
#!/bin/bash http://lifehacker.com/5574557/how-to...ent-with-gmail Here is another link about sending texts to your phone via email: http://www.email-unlimited.com/stuff...l-to-phone.htm I found that since I have AT&T (but used to be Cingular) I can send texts to my phone by sending an email to mynumber@txt.att.net or mynumber@cingularme.com. It would depend on your carrier. So, there's some ideas for you :) |
You can use a free dynamic IP service like dyndns or noip. Your URL (e.x. something.dyndns-server.com) is updated with the IP address via a client that either is built into the router (typically dyndns) or runs on your server.
|
All times are GMT -5. The time now is 05:02 PM. |