<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px">You can do what I do and set up dyndns... your router likely supports it.<br><div id="yui_3_16_0_1_1444998259124_62819"><span></span></div><div id="yui_3_16_0_1_1444998259124_62817"> </div><div id="yui_3_16_0_1_1444998259124_62818" class="signature">Steven Donegan<br>KK6IVC General Class FCC License<br>Silver State Car #86<br>www.sscc.us</div><br> <div id="yui_3_16_0_1_1444998259124_62845" style="font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1444998259124_62844" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1444998259124_62843" dir="ltr"> <hr size="1"> <font id="yui_3_16_0_1_1444998259124_62848" face="Arial" size="2"> <b id="yui_3_16_0_1_1444998259124_62847"><span id="yui_3_16_0_1_1444998259124_62846" style="font-weight:bold;">From:</span></b> Loren Tedford <lorentedford@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> app_rpt mailing list <app_rpt-users@ohnosec.org> <br> <b id="yui_3_16_0_1_1444998259124_62850"><span id="yui_3_16_0_1_1444998259124_62849" style="font-weight: bold;">Sent:</span></b> Saturday, October 17, 2015 11:45 AM<br> <b id="yui_3_16_0_1_1444998259124_62852"><span id="yui_3_16_0_1_1444998259124_62851" style="font-weight: bold;">Subject:</span></b> [App_rpt-users] How i deal with isp changing ips every day..<br> </font> </div> <div id="yui_3_16_0_1_1444998259124_62853" class="y_msg_container"><br><div id="yiv9040630051"><div id="yui_3_16_0_1_1444998259124_62855" dir="ltr"><div id="yui_3_16_0_1_1444998259124_62854">Ok so here is how i have dealt with ip changes every 12 hrs or so.. I know its horrible not having a static ip but our provider doesnt offer it for the package we have in order to get it they want to change about 240 dollars extra a month for business class internet.</div><div id="yui_3_16_0_1_1444998259124_62856"><br></div><div id="yui_3_16_0_1_1444998259124_62857">So i have copied together a mixture of information i found online and basically set it up that if the public ip changes it then takes and restarts asterisk via service asterisk stop then sleep for 5s then service asterisk start...</div><div id="yui_3_16_0_1_1444998259124_62858"><br></div><div id="yui_3_16_0_1_1444998259124_62859">I am by far the worst person in the world to rely on for scripts i seriously wish i understood shell scripts.. But here is what i have.</div><div><br></div><div><div>For this to work you need install</div><div>sudo apt-get install sendmail sendmail-bin</div><div>sudo sendmailconfig</div><div><br></div><div>If this is the first time using crontab -e command it will ask you which type of editor you wish to use 1 nano 2 vim I usually select option 1 for nano.</div><div>crontab -e</div><div><br></div><div>Put this line in crontab -e</div><div>*/2 * * * * sh /etc/asterisk/ip.sh</div><div><br></div><div>To exit crontab -e press ctrl + x it will then ask if you want to save the settings Y for yes then enter.</div><div><br></div><div>Create ip.sh I put it in /etc/asterisk/ folder</div><div>nano ip.sh-</div><div>#!/bin/bash</div><div>#### ip.sh shell script</div><div>#### this script sends mail to an email address if ip changes</div><div>#### Also restarts asterisks if the ip changes.</div><div>touch old_ip.dat</div><div><br></div><div>wget <a rel="nofollow" target="_blank" href="http://whatismyip.org/">whatismyip.org</a></div><div><br></div><div>read T1 <index.html</div><div>read T2 <old_ip.dat</div><div><br></div><div>if [ "$T1" = "$T2" ]; then</div><div> echo "IP Is the same doing nothing";</div><div>else</div><div>(echo "From: <a rel="nofollow" ymailto="mailto:Ipchanged@myrepeater.com" target="_blank" href="mailto:Ipchanged@myrepeater.com">Ipchanged@myrepeater.com</a>"; echo "To: <a rel="nofollow" ymailto="mailto:email@email.com" target="_blank" href="mailto:email@email.com">email@email.com</a>"; echo "Subject: IP Address Update"; echo; echo "Computer's IP Changed. The new IP is:"; cat /etc/asterisk/index.html) | sendmail -f <a rel="nofollow" ymailto="mailto:Ipchanged@myrepeater.com" target="_blank" href="mailto:Ipchanged@myrepeater.com">Ipchanged@myrepeater.com</a> <a rel="nofollow" ymailto="mailto:email@email.com" target="_blank" href="mailto:email@email.com">email@email.com</a></div><div>service asterisk stop</div><div>sleep 5s</div><div>service asterisk start</div><div>fi</div><div><br></div><div>rm old_ip.dat</div><div>mv index.html old_ip.dat</div></div><div><br></div><div>### End of shell script ip.sh</div><div><br></div><div><br></div><div><br></div><br clear="all"><div><div class="yiv9040630051gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:arial;font-size:small;">Loren Tedford (KC9ZHV) <br>Email: <a rel="nofollow" ymailto="mailto:lorentedford@gmail.com" target="_blank" href="mailto:lorentedford@gmail.com" style="color:rgb(17,85,204);">lorentedford@gmail.com</a></div><div style="font-family:arial;font-size:small;">Main Line:1-631-686-8878 Option 1 for Loren.</div><div style="font-family:arial;font-size:small;">Fax Line 1:1-618-551-2755</div><div style="font-family:arial;font-size:small;">Fax Line 2:1-631-686-8892 (New Fax line)</div><div><font face="arial" size="2">Cell: 618-553-0806</font><br></div><div style="font-family:arial;font-size:small;"><a rel="nofollow" target="_blank" href="http://www.lorentedford.com/" style="color:rgb(17,85,204);">http://www.lorentedford.com</a></div><div style="font-family:arial;font-size:small;"><a rel="nofollow" target="_blank" href="http://www.kc9zhv.com/">http://www.kc9zhv.com</a></div><div style="font-family:arial;font-size:small;"><a rel="nofollow" target="_blank" href="http://hub.kc9zhv.com/">http://hub.kc9zhv.com</a></div></div></div></div></div></div></div></div>
</div></div><br>_______________________________________________<br>App_rpt-users mailing list<br><a ymailto="mailto:App_rpt-users@ohnosec.org" href="mailto:App_rpt-users@ohnosec.org">App_rpt-users@ohnosec.org</a><br><a href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users" target="_blank">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users</a><br><br>To unsubscribe from this list please visit <a href="http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users" target="_blank">http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users </a>and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"<br>You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem. <br><br></div> </div> </div> </div></body></html>