15:05 Thu, 31 Mar 2005 PST -0800

OpenVPN Auth-LDAP Plugin

Yesterday I implemented a LDAP authentication plugin for OpenVPN 2.x. OpenVPN's new plugin architecture makes it surprisingly easy to extend the software in very useful ways.

More information and the source code are available on this page

[/code/ldap] permanent link

03:45 Thu, 10 Feb 2005 PST -0800

Gathering Interface Statistics with PF

Introduction

Yesterday, I wanted to gather bandwith usage statistics on my FreeBSD pf(4) based firewall in order to graph incoming and outgoing bandwidth utilization.

pfctl(8) provides the '-s info' flag, which can provide statistics on a single interface at a time. The interface can be chosen with the either the "loginterface" directive in pf.conf, or by using the DIOCSETSTATUSIF ioctl. However, I needed statics for all the network interfaces, not just one.

Fortunately, pf(4) also provides the DIOCIGETIFACES ioctl, which allows me to gather packet and byte statistics on all interfaces at once. This article will provide an introduction to using the pf(4) ioctl interface to gather network interface traffic statistics. Full example source code can be downloaded here. Note that PF does not maintain statistics on traffic that does not pass through PF. If you don't use PF, all the counters will be zero.

Click here to read more ...

[/code/bsd] permanent link

15:13 Tue, 07 Dec 2004 PST -0800

Installing and Using the MinGW Cross-Compiler on Mac OS X

MinGW supplies header files, import libraries, and a compiler tool-chain based on GNU cc and binutils for building native Windows executables and libraries with no dependencies on third party libraries.

I am using the MinGW tool-chain to compile the Win32 port of OpenDarwin libFoundation. To cross-compile the library on my Mac OS X machine, I created DarwinPorts Portfiles for the MinGW tool-chain.

In this article I'll document how to install the MinGW ports, build a "Hello, World" example, and run the result on a x86 machine using Wine.

Click here to read more ...

[/code/win32] permanent link

13:13 Sun, 10 Oct 2004 PDT -0700

Fixing ptrace(pt_deny_attach, ...)

NOTE: For information on Mac OS X Tiger, refer to this article.

In Mac OS X, Apple introduced an additional, non-standard request type to the ptrace() system call - PT_DENY_ATTACH. While an understandable addition, especially in terms of providing plausible defense for their DRM applications, PT_DENY_ATTACH has come to be used by a number of third party developers in an attempt to provide further copy protection.

This is unfortunate for those of us with a genuine need to attach a debugger; There are several circumstances when this ability is necessary, including working with libSystem, writing a runtime patch with APE, writing a kext, writing an input manager, or software auditing.

There are several possible ways to work around this behavior; breaking on ptrace(2) in gdb, recompiling your kernel, or writing a kext. I choose to write a kext that hooks ptrace(2).

Click here to read more ...

[/code/macosx] permanent link

21:43 Sun, 12 Sep 2004 PDT -0700

Accessing My Sources Using Arch

GNU Arch, while incredibly obtuse, has a relatively unique featureset that I've come to appreciate. As such, I've begun using it for my externally available source code. There are two projects currently available in my arch repository - the project containing this web log, and TclObjC, a Tcl<->Obj-C bridge that I have been working on.

If you want to browse my arch repository, just point your web browser at my ArchZoom interface. To access the repository directly, you'll need the arch client, tla. If you're using Mac OS X or Darwin, you can use DarwinPorts to install it. Once you have arch installed, use the commands below to access my archive.

Click here to read more ...

[/code] permanent link

12:44 Wed, 07 Jul 2004 PDT -0700

Introduction / Implementation

For quite some time I have wanted an easy means of sharing information in a semi-attractive format while expending the least possible effort. To this end, I have finally assembled a web log based on Blosxom, Arch, and duct tape.

All my modifications to blosxom and various blosxom plugins can be accessed via my arch repository. See this post for details on accessing the arch repository.

[/code] permanent link