I've been happily running Logwatch on several servers with the default 'yesterday' date range for several years. However I needed to run it for a client with a larger date range to check out a problem. But the options available for logwatch are only 'today', 'yesterday' and 'all'. Or so it told me. And even worse, the 'yesterday' option takes the date from the previous day, and pulls out all the info on that date. So if you run your logwatch report at 4pm, you're missing out on 16 hours worth of data! But it turns out logwatch is smarter than that …
ZTE USB Modem on Linux. Send SMS, Check Balance
Seems like a lot of the information on the internet about this is out of date, and there is much old and unmaintained software. Here's what worked for me. I'm running Linux Mint 17, which is based on Ubuntu 14. This should also work on Debian.
So I have a SmartBro modem, which I use when my main internet connection breaks. A lot of the time it sits in my drawer, and I just top up the balance every 3 months with 30 pesos, to keep the number active. I can send the loads via online bank account, or coins.ph, or from any cornershop Loadz person, but how to check the balance when you're running Linux.
I've struggled with previous GSM modem interfaces before like Gnokii, and SMStools. This is waaaay simpler.
Renewing a CAcert SSL certificate in ISPconfig
As always, this is something that didn't work as expected when I tried it and needed some fiddling. So I publish it on the internet in case it helps someone else out. So without further ado. The first part of the process is easy. You simply go to Cacert.org, go to Server Certificates, select the … Read more
How to change the time anacron runs.
Well this one took me a while to figure out, so I thought I'd blog about it in case I could save someone else some time. Anacron is installed on desktop / laptop orientated distributions as they're often switched off. It basically makes sure the daily, weekly and monthly cron jobs are run by checking … Read more
UFW and OpenVPN
I used the excellent script here to setup OpenVPN on a server I'm running recently. I've set it up a hundred times before manually, and frankly its a bit of a slog, so its nice to find a tool that can do it for you and cut out the drudgery. And it nearly did, except on this particular server it didn't work. Clients could connect, but couldn't use the internet through the VPN.
After scratching my head for a while, I narrowed it down to the IPv4 forwarding. The script puts this line into iptables
"iptables -t nat -A POSTROUTING -s 10.8.0.0/d" and adds it to /etc/rc.local
But it wasn't appearing in the rules. Turns out this was because it had ufw installed, which is a simplified firewall interface which sits on top of iptables. The newly added rules were just being overwritten by ufw.