tmo-monitor
tmo-monitor copied to clipboard
Use technique other than ping to assess connection status
It looks like T-Mobile started blocking pings, and so the connection looks down even when it's not. This broke this tool for me – I'm assuming for others too.
We should add a different mechanism, such as DNS lookup or HTTP request.
I'm not seeing a block of pings on my connection. Did you make a network change? Or maybe it is happening but geographically. It would be bad network policy to do it though.
It's unclear how broad it is: https://reddit.com/r/tmobileisp/comments/y3uqto/no_reply_to_pings_today/
If it helps, this is the route-test script that I use now that I cannot get a ICMP reply on TMOHI:
#!/bin/sh
# Checks for WAN connectivity
#
# add your website targets here
targets="1.1.1.1 www.google.com"
reboot_if_fail=$1
# Print Config
/tmo-monitor/tmo-monitor.py --skip-bands --ping-count 0
for host in $targets
do
# curl -Is -m 1 --head http://$host 2>$1 | grep -w "200\|301" > /dev/null
wget -S --spider -T 1 $host 2>$1
# nc -zv -w 1 $host http 2>$1
if [ $? == 0 ]
then
echo "Online"
exit 0
fi
done
# fail
echo "Failed"
if [ $reboot_if_fail == 1 ]
then
echo "Forcing Reboot"
/tmo-monitor/tmo-monitor.py --reboot
fi
exit 1