Remote weather sensing — geek style

So: A family member sort of mentioned a desire to monitor the weather a at undisclosed secure location some 100+km from where he lives…

Several manufacturers offer solutions to this, but they are either 1) expensive, 2) unelegant or 3) both. And the geek-factor in choosing that route is very low…
Continue reading

Posted in Arduino, Coding, Electronics, Networking | Leave a comment

Messing with chinese spammers

When you see this in /var/log/mail.log, you know the chinese are out to get you:

Aug 10 14:15:05 manstein postfix/smtpd[7858]: connect from static-186-155-242-140.static.etb.net.co[186.155.242.140]
Aug 10 14:15:08 manstein postfix/smtpd[7858]: warning: static-186-155-242-140.static.etb.net.co[186.155.242.140]: SASL LOGIN authentication failed: authentication failure
Aug 10 14:15:08 manstein postfix/smtpd[7858]: lost connection after AUTH from static-186-155-242-140.static.etb.net.co[186.155.242.140]
Aug 10 14:15:08 manstein postfix/smtpd[7858]: disconnect from static-186-155-242-140.static.etb.net.co[186.155.242.140]

If, like me your first instinct is to block the entire IP range/AS in the firewall range and then secondly you remember that you have a TODO about tinkering with the Mikrotik, adding a dynamic address list of spammers (and SSH bots etc.), you get tired in a hurry.

Luckily, if the bandwidth consumed is small, you can “just” null-route the bastards:

sudo route add 123.56.236.175 gw 127.0.0.1 lo

or if you’re really annoyed:

~$ whois 123.56.236.175
% [whois.apnic.net]
% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html
% Information related to '123.56.0.0 - 123.57.255.255'
inetnum:        123.56.0.0 - 123.57.255.255
.....
% Information related to '123.56.0.0/15 AS37963'

and

sudo route add -net 123.56.0.0/15 gw 127.0.0.1 lo

Boom – the entire AS is gone, and hopefully the emails about your AliExpress purchases are originating in another net…

 

Posted in Networking, Routing, SMTP | Tagged | Leave a comment

Tracking down a NoSuchMethodError

Caused by: java.lang.NoSuchMethodError: org.apache.xml.serializer.Encodings.isRecognizedEncoding(Ljava/lang/String;)Z
        at org.apache.xml.serializer.dom3.LSSerializerImpl.write(LSSerializerImpl.java:926)
        at ...

If you’ved ever had the unpleasant task of figuring out which of the 200+ JAR dependencies in your project that are causing the a NoSuchMethodError (usually in some XML or webservice code), then this is the trick for you: Continue reading

Posted in Coding, Java | Leave a comment

Static fixed and wifi IPs on Raspberry Pi

When coding to and configuring ones Raspberry Pi, it is convenient to have it on a wired connection, but when it is being deployed in the field, it is much easier to have it on wifi.

Still, it can be immensely useful to have it’s IPs always be fixed, making surveillance etc a breeze (or more breezely, to be exact) and thus here’s a quick guide to making that happen. There are other tutorials on this, but most are about fixed IP for either eth0 or wlan0. Continue reading

Posted in Linux, Networking, Raspberry Pi | Leave a comment

A selection of handy unix/linux one-liners

Over the years I’ve found myself repeatedly using (variations of) the same one-liners to achieve certain tasks in unix/linux environments. Task such as finding files containing strings, finding sizes of directories etc.
Continue reading

Posted in Linux, Unix | Leave a comment

HOWTO: Get IPv6 in your home

Since IPv6 Day when I registered for a SixXS handle, I’ve wanted to jump on the IPv6 wagon at home. My setup is a DSL line with Telenor as my ISP. Almost needless to say, Telenor does not do native IPv6, so another route had to be taken – as noted above, SixXS seems a good choice, since they have made arrangements with several transit providers/colo’s/ISPs to provide PoP’s (point of presence) whereto mortal users, such as myself, can tunnel IPv6 traffic. Continue reading

Posted in IPv6, Networking | Tagged , , , , | Leave a comment

HOWTO: Time lapse with Contour HD GPS

(NOTE: This is a work in progress and mostly to remind myself of the process…)

When I started out experimenting with time lapse movies, I found there were surprisingly few ready-made open source or even commercial software packages that were simple to use, effective or even relevant for my relatively modest needs.

Of course there is QuickTime Pro and all the full blown movie editing packages, but being a geek I figured I could do better. Or at least cheaper 🙂
Continue reading

Posted in Linux, Photo | Tagged , , , , , | 1 Comment

GWTP, Guice and Spring non-trivial beans

Having struggled a bit with the somewhat terse documentation and JavaDoc I finally figured out the tricks of using Guice and GWTP along with Spring. As much for my own future reference and for others that may have the same issues, here’s what I did.

Continue reading

Posted in Coding | Tagged , , , , | Leave a comment