1
0

Patrick.net Upness Monitoring


 invite response                
2021 Oct 27, 10:53pm   102 views  2 comments

by Patrick   ➕follow (55)   💰tip   ignore  

Since my patrick.net server at Digital Ocean was cut off from the network three times recently, something that has never happened before, I decided I need better monitoring.

My old monitor was simply a cron job on the same machine which would try to grab some web pages and send an email to my tmobile number @tmomail.com if the web server process failed to produce a reasonable response. That's fine if the server machine is still on the network, but obviously such a monitor can't notify me if a malicious employee of Digital Ocean simply cuts off the networking entirely, because then no email will go out to notify me that the website is inaccessible. So I don't want my monitor to be running on the same machine as the web server.

I have a Pinebook Pro which I got this last spring for $200 just to check it out, and it's kind of crappy, but makes a nice little backup device at home. My main laptop automatically rsyncs to it via cron over the wifi. And it can hit the internet. So it seems like it would be a reasonable place to run my patrick.net upness monitor. But after a few days, I still haven't been able to do it.

The first problem was that my stupid ISP (Sonic/ATT) blocks all outbound port 25 connections, as if that will stop spam. One needs only to send email on port 587 instead. So I tried to configure postfix to send on port 587, but then realized that I could just directly make a connection to the @tmomail.com mail server on port 587 using bash or netcat and feed it the mail. I got that working, so I could send out email, but the tmomail.com server just ignored it and never sent an alert text to my phone as it should have.

That was because of yet more "spam blocking", ugh. tmomail.com will not accept an email unless the sending IP has an associated domain name with at least an spf TXT record. I tried setting up the right dns records for a subdomain of patrick.net to map to my home IP address, but still no dice. tmomail.com uses reverse IP lookup, and I don't own the IP address that my ISP set up for my home internet, so tmomail.com won't even consult the dns records I set up.

So the question is this: how can a laptop on a home ISP network send an email via a bash script? I suppose I could use Selenium to drive a browser and then send a mail from Protonmail, but that seems like overkill.

Or maybe there's some non-email way that my laptop could send a message to my phone. They are both on the internet, so you'd think it would be possible.

Comments 1 - 2 of 2        Search these comments

1   NuttBoxer   2021 Oct 28, 8:33am  

I used to keep tabs on my Tor relay I think using uptime robot. Have you looked into using a service?
2   Patrick   2021 Oct 28, 9:57am  

Good point, there are services that do this. I usually figure I can do everything myself, but maybe it's not worth it.

Please register to comment:

api   best comments   contact   latest images   memes   one year ago   random   suggestions