Saw a couple of monkeys on the telephone lines in Pontian.
I run this website via dynamic DNS from a home server connected to the internet via a ASUS RT-n66u which is a great router. A couple of weeks ago, our internet connection got a bit wonky and Singtel send a technician over who could not solve the problem. The problem is that internet connectivity would be lost for a hour or two almost every day which was the reason for the script that I wrote. The problem has since disappear and since I have not changes any equipment, it must have been an issue with Singtel’s backend.
But during the problem period, I was tweaking the settings on the router in the hopes of solving the problem which it did not. But what I did do was to screw up the internal network access to this website. The routing used to work within the internal network when computers at home accessed this website but since the tweaking exercise, it has not. But the external world is fine.
After much searching and head scratching, I finally found out the issue was due to the QoS option not being turned on in the ASUS router. Why would NAT loopback only work when QoS is enabled is beyond me. But it works now and I am happy.
Looking at the following picture taken using my iPhone 5S and processed using Snapseed on the same phone, it is amazing how much technology has advanced. What used to take a dedicated dSLR and post processing using a computer is now a trivial process on a phone. It is either amazing or it is showing my age.
Pauline was complaining of internet connectivity issues at home which was rather random and prolonged. Each time, connectivity would drop for an hour or 2 and then it would suddenly work without intervention.
This is really strange and has happened in the past but it was not common. It appears to be more frequent recently or it could be that Pauline is at home more often and notices it.
So I wrote a small naive Python script to ping Google and placed that in the crontab to run every five minutes. The following is the script if it helps anyone.
#!/usr/bin/env python import urllib2 import datetime try: r = urllib2.urlopen("http://www.google.com") outfile = open("/home/bernett/google_ping.txt", "a") outfile.write("%s - HTTP code %s\n" % (datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"), r.getcode())) outfile.close() except: outfile = open("/home/bernett/google_ping.txt", "a") outfile.write("%s - %s\n" % (datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"), "ERROR - failed to connect to Google")) outfile.close()