mthssdrbrg / ddns-route53 Goto Github PK
View Code? Open in Web Editor NEWDynamic DNS updater using AWS Route53
License: The Unlicense
Dynamic DNS updater using AWS Route53
License: The Unlicense
Just wondering if this script needs to be manually added to crontab or if it automatically sets itself up to run.
So I'm totally unsure why, but the following does not work for me (times out):
dig +short myip.opendns.com @resolver1.opendns.com
It does work fine if I don't specify @resolver1.opendns.com.
For my home purposes I'm just going to leave that part off.
If I run the script manually, I get the following output:
Current IP == a.b.c.d
But if running it from cron (piping output to a log file), I get the following:
IP changed from '' to 'a.b.c.d', updating entry
where a.b.c.d is my actual IP.
I added a couple of echo statements in the script inside the main() function and looks like when it's ran from cron, the old_ip variable is blank.
Any thoughts?
Seem like the 'opendns' method for fetching external IP address is broken.
I have a proven the following remedy to be working:
Modify ddns-route53
, line 73:
ip="$(curl ifconfig.co)" ###ip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
Readme.md should be update to require 'curl' as opposed to 'dig'
Thanks for the great work!
script did not work properly from a few days ago.
so, I did check script, and result is follow.
jehos@pi-router:~$ MYIP=$(dig +short myip.opendns.com @resolver1.opendns.com); date; echo $MYIP; geoiplookup $MYIP
Sat Aug 18 00:01:52 CST 2018
74.117.178.155
GeoIP Country Edition: VG, Virgin Islands, British
GeoIP City Edition, Rev 1: VG, 00, N/A, Road Town, N/A, 18.416700, -64.616699, 0, 0
GeoIP ASNum Edition: AS40824 WZ Communications Inc.
jehos@pi-router:~$ MYIP=$(dig +short myip.opendns.com @resolver1.opendns.com); date; echo $MYIP; geoiplookup $MYIP
Sat Aug 18 00:01:53 CST 2018
31.13.87.3
GeoIP Country Edition: IE, Ireland
GeoIP City Edition, Rev 1: IE, N/A, N/A, N/A, N/A, 53.347198, -6.243900, 0, 0
GeoIP ASNum Edition: AS32934 Facebook, Inc.
jehos@pi-router:~$ MYIP=$(dig +short myip.opendns.com @resolver1.opendns.com); date; echo $MYIP; geoiplookup $MYIP
Sat Aug 18 00:01:54 CST 2018
108.160.165.8
GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, CA, California, San Francisco, 94107, 37.769699, -122.393303, 807, 415
GeoIP ASNum Edition: AS19679 Dropbox, Inc.
jehos@pi-router:~$ MYIP=$(dig +short myip.opendns.com @resolver1.opendns.com); date; echo $MYIP; geoiplookup $MYIP
Sat Aug 18 00:01:55 CST 2018
108.160.170.52
GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, VA, Virginia, Ashburn, 20149, 39.048100, -77.472801, 511, 703
GeoIP ASNum Edition: AS19679 Dropbox, Inc.
jehos@pi-router:~$ MYIP=$(dig +short myip.opendns.com @resolver1.opendns.com); date; echo $MYIP; geoiplookup $MYIP
Sat Aug 18 00:01:56 CST 2018
128.242.240.116
GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, CO, Colorado, Englewood, 80111, 39.623699, -104.873802, 751, 303
GeoIP ASNum Edition: AS2914 NTT America, Inc.
It worked well on servers installed in other countries, but it did not work in certain countries.
(see execute time, and result ip)
some country seems to be interfering with IP verification.
this is workaround
diff --git a/ddns-route53 b/ddns-route53
index 3c4b5bf..0ccefea 100755
--- a/ddns-route53
+++ b/ddns-route53
@@ -70,7 +70,8 @@ function init-args() {
shift
done
if [[ -z "$ip" ]]; then
- ip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
+ #ip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
+ ip="$(curl -s whatismyip.akamai.com)"
fi
old_ip="$(fetch-current-ip 2> /dev/null)"
return 0
but it just workaround.
The script should have some cross validation function..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.