Select Page

Short visit to Zurich

I went to Zurich for a few days this week, I have never been to Switzerland and Expedia had some good deals. I took a couple of photos of the city and people, mostly people, a collection of them can be found here. It is a small city with lots of little cramped roads and pavements that’s filled with tables and people eating. This style of architecture is very difficult to show on photos, so I focused mostly on the people.

Calculating CIDR notation from IP ranges

Following from my previous post about blocking some more countries I discovered a bit of a short coming in the code I used to calculate CIDR notation from ranges of IP’s. So a bit of searching on CPAN got me Net::CIDR.

use Net::CIDR;
$range = shift;
print (join(“\n”, Net::CIDR::range2cidr(“$range”)) . “\n” );

This will take any given range of ip address in format a.b.c.d-w.x.y.z and spew out a list of subnets required to cover the whole range:

# ./range2cidr.pl 64.139.147.0-64.139.170.255
64.139.147.0/24
64.139.148.0/22
64.139.152.0/21
64.139.160.0/21
64.139.168.0/23
64.139.170.0/24

So with this I now have hopefully a more accurate set of rules that will not block bits of New Zeeland as well by accident.

Taking Control Over Depth Of Field

Digital Outback Photo has a good article about Depth Of Field, well worth a read for anyone interested in moving from taking snapshots to taking photos that appeal on an artistic level.
It covers the basics of Depth of Field, how to achieve it using a camera and why in some cases it is very difficult, it then introduces the new Photoshop CS Lens Blur Filter that can simulate this effect where it was too difficult to achieve using the camera alone.

One of the skills that separates novice photographers from the more experienced is an awareness and control over “Depth of Field” (commonly referred to by its abbreviation “DOF”). Sometimes, to get the shot, we need to use a very small aperture. When we do, not only is the subject in sharp focus, but features in the background and/or foreground can compete for attention. This tutorial will walk you through the steps in using a new feature in Adobe Photoshop CS: the Lens Blur filter.

Windows XP SP2 and WebDAV

A few of the guys in the office installed SP2 to start testing out and see what problems we will have from users. So far we discovered that where we could mount WebDAV folders on our FreeBSD Apache WebDAV server using the Map Network Drive dialog in explorer this now fails. It does not send the username in the HTTP request at all. Accessing it via File->Open and selecting “Open as Web Folder” using IE still works.
For now the work around we chose is to use Novell Netdrive, it seems like it is a free download and it allows you to mount WebDAV, FTP and Novell iDrive folders on your windows machine. It is much nicer than the mess of doing it through Map Network Drive and having to fiddle usernames etc.

More country blocking

After blocking China and Korea recently I have still been getting quite a bit of scans and unfriendly traffic. Especially people who have been trying to log into my SSH servers with some simple user accounts like guest or by trying root logins. It’s purely automated and hit all my IP addresses. This comes from Japan mostly so I decided it is time to rid my world of the Japanese as well.
Problem was getting a good source for IP ranges. Turns out Maxmind publish their GeoIP Free Country database in CSV format as well, so then it was just a matter of writing up a tool to take their ranges of IP’s and create cidr notation entries and produce ipfw commands from those.
I got a bit of code from Gary Colman to do the translation from ranges to cidr notation and built that into my existing firewall builder script.