LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to Do the Following? Running Script at Boot-Time + Sending Mail (https://www.linuxquestions.org/questions/linux-general-1/how-to-do-the-following-running-script-at-boot-time-sending-mail-207011/)

LinuxGeek 07-19-2004 01:06 PM

How to Do the Following? Running Script at Boot-Time + Sending Mail
 
I just got a dsl connection and want to access my pc remotely. Since I have a dynamic IP and the power can cut at any time, I'm trying to do the following:
automatically run an iptables script at boot time
send myself an email to my yahoo account with the new ip
How would I go about doing this? Thanks for your time.

PS. I'm using Debian SID.

osvaldomarques 07-20-2004 12:06 AM

You don't need this, man. All you have is get a free account at dyndns.org or other provider and register a dynamic dns name. Then install one of their utilities (I recommend ez-ipupdate) to update the address of your machine whenever it connects to the internet. Adsl is a connection which uses the ppp protocol. When ppp starts up it starts a script named "/etc/ppp/ip-up". In this script you can call your script to setup the firewall as well as your dns update.
Then, whenever you want to call your machine, you will use your dynamic dns name.


All times are GMT -5. The time now is 06:13 PM.