[App_rpt-users] App_rpt-users Digest, Vol 80, Issue 72
wg
wg at hawaii.rr.com
Sun Oct 18 16:11:26 UTC 2015
I've used dyndns.com for years to resolve the problem. Most modern routers
have dyndns setup in their settings which will report any ip change right
away thus not having to over monitor it.
Aloha
Wayne
KH6XP
-----Original Message-----
From: app_rpt-users-bounces at ohnosec.org
[mailto:app_rpt-users-bounces at ohnosec.org] On Behalf Of
app_rpt-users-request at ohnosec.org
Sent: Sunday 6:00 AM
To: app_rpt-users at ohnosec.org
Subject: App_rpt-users Digest, Vol 80, Issue 72
Send App_rpt-users mailing list submissions to
app_rpt-users at ohnosec.org
To subscribe or unsubscribe via the World Wide Web, visit
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
or, via email, send a message with subject or body 'help' to
app_rpt-users-request at ohnosec.org
You can reach the person managing the list at
app_rpt-users-owner at ohnosec.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of App_rpt-users digest..."
Today's Topics:
1. How i deal with isp changing ips every day.. (Loren Tedford)
2. ip change (Loren Tedford)
3. Re: How i deal with isp changing ips every day.. (Steven Donegan)
4. Re: How i deal with isp changing ips every day.. (Bryan Fields)
----------------------------------------------------------------------
Message: 1
Date: Sat, 17 Oct 2015 13:45:36 -0500
From: Loren Tedford <lorentedford at gmail.com>
To: app_rpt mailing list <app_rpt-users at ohnosec.org>
Subject: [App_rpt-users] How i deal with isp changing ips every day..
Message-ID:
<CAK=eTyhW960UeHry6+go-wRW5X5fhaGqZ5Uj-snLwfQUC9V=VA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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.
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...
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.
For this to work you need install
sudo apt-get install sendmail sendmail-bin sudo sendmailconfig
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.
crontab -e
Put this line in crontab -e
*/2 * * * * sh /etc/asterisk/ip.sh
To exit crontab -e press ctrl + x it will then ask if you want to save the
settings Y for yes then enter.
Create ip.sh I put it in /etc/asterisk/ folder nano ip.sh- #!/bin/bash ####
ip.sh shell script #### this script sends mail to an email address if ip
changes #### Also restarts asterisks if the ip changes.
touch old_ip.dat
wget whatismyip.org
read T1 <index.html
read T2 <old_ip.dat
if [ "$T1" = "$T2" ]; then
echo "IP Is the same doing nothing";
else
(echo "From: Ipchanged at myrepeater.com"; echo "To: email at email.com"; echo
"Subject: IP Address Update"; echo; echo "Computer's IP Changed. The new IP
is:"; cat /etc/asterisk/index.html) | sendmail -f Ipchanged at myrepeater.com
email at email.com service asterisk stop sleep 5s service asterisk start fi
rm old_ip.dat
mv index.html old_ip.dat
### End of shell script ip.sh
Loren Tedford (KC9ZHV)
Email: lorentedford at gmail.com
Main Line:1-631-686-8878 Option 1 for Loren.
Fax Line 1:1-618-551-2755
Fax Line 2:1-631-686-8892 (New Fax line)
Cell: 618-553-0806
http://www.lorentedford.com
http://www.kc9zhv.com
http://hub.kc9zhv.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://ohnosec.org/pipermail/app_rpt-users/attachments/20151017/096aed9b/at
tachment-0001.html>
------------------------------
Message: 2
Date: Sat, 17 Oct 2015 13:49:09 -0500
From: Loren Tedford <lorentedford at gmail.com>
To: app_rpt mailing list <app_rpt-users at ohnosec.org>
Subject: [App_rpt-users] ip change
Message-ID:
<CAK=eTyjAgMS3aHkngomPvcUOkK2U-tUOvumg_Dir01C1bjA=LQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
for some reason when i sent it via email it kinda warped the shell script
here is a better example of the shell script.
http://forum.kc9zhv.com/index.php?topic=27.msg29#msg29
Loren Tedford (KC9ZHV)
Email: lorentedford at gmail.com
Main Line:1-631-686-8878 Option 1 for Loren.
Fax Line 1:1-618-551-2755
Fax Line 2:1-631-686-8892 (New Fax line)
Cell: 618-553-0806
http://www.lorentedford.com
http://www.kc9zhv.com
http://hub.kc9zhv.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://ohnosec.org/pipermail/app_rpt-users/attachments/20151017/20a2c2c8/at
tachment-0001.html>
------------------------------
Message: 3
Date: Sat, 17 Oct 2015 18:50:26 +0000 (UTC)
From: Steven Donegan <donegan at donegan.org>
To: Loren Tedford <lorentedford at gmail.com>, app_rpt mailing list
<app_rpt-users at ohnosec.org>
Subject: Re: [App_rpt-users] How i deal with isp changing ips every
day..
Message-ID:
<1543515296.1968404.1445107826878.JavaMail.yahoo at mail.yahoo.com>
Content-Type: text/plain; charset="utf-8"
You can do what I do and set up dyndns... your router likely supports it.
?Steven Donegan
KK6IVC General Class FCC License
Silver State Car #86
www.sscc.us
From: Loren Tedford <lorentedford at gmail.com>
To: app_rpt mailing list <app_rpt-users at ohnosec.org>
Sent: Saturday, October 17, 2015 11:45 AM
Subject: [App_rpt-users] How i deal with isp changing ips every day..
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.
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...
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.
For this to work you need installsudo apt-get install sendmail
sendmail-binsudo sendmailconfig 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.crontab -e Put this line in crontab -e*/2 *
* * * sh /etc/asterisk/ip.sh To exit crontab -e press ctrl + x it will then
ask if you want to save the settings Y for yes then enter.
Create ip.sh I put it in /etc/asterisk/ foldernano ip.sh-#!/bin/bash####
ip.sh shell script#### this script sends mail to an email address if ip
changes#### Also restarts asterisks if the ip changes.touch old_ip.dat wget
whatismyip.org read T1 <index.htmlread T2 <old_ip.dat if [ "$T1" = "$T2" ];
then?echo "IP Is the same doing nothing";else(echo "From:
Ipchanged at myrepeater.com"; echo "To: email at email.com"; echo "Subject: IP
Address Update"; echo; echo "Computer's IP Changed. The new IP is:"; cat
/etc/asterisk/index.html) | sendmail -f Ipchanged at myrepeater.com
email at email.comservice asterisk stopsleep 5sservice asterisk startfi rm
old_ip.datmv index.html old_ip.dat ### End of shell script ip.sh
Loren Tedford (KC9ZHV)?
Email:?lorentedford at gmail.comMain Line:1-631-686-8878 Option 1 for Loren.Fax
Line 1:1-618-551-2755Fax Line 2:1-631-686-8892 (New Fax line)Cell:
618-553-0806
http://www.lorentedford.comhttp://www.kc9zhv.comhttp://hub.kc9zhv.com
_______________________________________________
App_rpt-users mailing list
App_rpt-users at ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to
the bottom of the page. Enter your email address and press the "Unsubscribe
or edit options button"
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://ohnosec.org/pipermail/app_rpt-users/attachments/20151017/06824abe/at
tachment-0001.html>
------------------------------
Message: 4
Date: Sat, 17 Oct 2015 15:05:17 -0400
From: Bryan Fields <Bryan at bryanfields.net>
To: app_rpt mailing list <app_rpt-users at ohnosec.org>
Subject: Re: [App_rpt-users] How i deal with isp changing ips every
day..
Message-ID: <56229BED.5000106 at bryanfields.net>
Content-Type: text/plain; charset=windows-1252
On 10/17/15 2:45 PM, Loren Tedford wrote:
> 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.
if an IP out of 44/8 would work you're welcome to us a VPN and I can route
you a /29 or /31 of IP space.
--
Bryan Fields
727-409-1194 - Voice
727-214-2508 - Fax
http://bryanfields.net
------------------------------
_______________________________________________
App_rpt-users mailing list
App_rpt-users at ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
End of App_rpt-users Digest, Vol 80, Issue 72
*********************************************
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the App_rpt-users
mailing list