Using the CPAN shell / Installing Bundle::CPAN on OpenBSD

Before you can use the CPAN shell on OpenBSD you need to install p5-LWP-UserAgent-Determined from the ports tree/packages.

Otherwise you wont be able to fetch any components properly

Fetching with Net::FTP:
Couldn't fetch 01mailrc.txt.gz from
Trying with "/usr/bin/lynx -source" to get
gzip: /root/.cpan/sources/authors/01mailrc.txt: unknown suffix: ignored

& the process will bomb out with MD5 checksum errors eg:

Trying with "/usr/bin/lynx -source" to get
gzip: /root/.cpan/sources/authors/id/A/AN/ANDK/Bundle-CPAN-1.853.tar: unknown suffix: ignored
CPAN: Digest::MD5 loaded ok

Trying with "/usr/bin/lynx -source" to get

Checksum mismatch for distribution file. Please investigate.

Distribution id = A/AN/ANDK/Bundle-CPAN-1.853.tar.gz
CPAN_USERID ANDK (Andreas J. Koenig <andreas;)
localfile /root/.cpan/sources/authors/id/A/AN/ANDK/Bundle-CPAN-1.853.tar.gz

I'd recommend removing
/root/.cpan/sources/authors/id/A/AN/ANDK/Bundle-CPAN-1.853.tar.gz. Its MD5
checksum is incorrect. Maybe you have configured your 'urllist' with
a bad URL. Please check this array with 'o conf urllist', and retry.

Cisco Aironet 350

I normally wouldn’t say this about a Cisco product, but WOW, the 100mW transmit power on the arials means I can get coverage everywhere in my house with this card plugged into my workpad, I struggle with most spots on my Axim, PowerBook or ThinkPad with a Orinocco plugged in.
The only problem I’ve ran into so far is a bug in NetBSD 3.0 (& OpenBSD 3.9 aswell aparently). It seems that once you upgrade to the recent versions of the firmware for this card (5.60 series), the AN(4) driver fails to attach & complains about the record buffer being too small
an0 at pcmcia0 function 0: <cisco Systems, 350 Series Wireless LAN Adapter>
pcic0: port 0x15000440-0x1500047f
ISA IRQ 3 -> vrgiu0 port 9, level high through
pcmcia0: card irq 3
an0: record buffer is too small, rid=ff00, size=198, len=258
an0: read caps failed
an0: failed to attach controller
an0 detached

Once I downgraded to version 5.41 the problem went away!! 🙂

an0 at pcmcia0 function 0: <cisco Systems, 350 Series Wireless LAN Adapter>
pcic0: port 0x15000440-0x1500047f
ISA IRQ 3 -> vrgiu0 port 9, level high through
pcmcia0: card irq 3
an0: Cisco Systems 350 Series (firmware 5.41)
an0: 802.11 address: 00:0f:90:xx:xx:xx, channel: 1-13
an0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

Checking the NetBSD gnats database I found a PR which has a fix attached though I haven’t had a chance to try it out yet.

There is a patch for OpenBSD here which I presume is included in 4.0

Connecting to a Windows PPTP based VPN through a OpenBSD / PF firewall

To be able to connect to a Windows based PPTP VPN through a OpenBSD firewall you’ll need to make a couple of changes to allow GRE traffic through.
first add the following to /etc/sysctl.conf:

then add the following to the filter section in your /etc/pf.conf:
pass in on $ext_if proto gre all keep state
pass out on $ext_if proto gre all keep state

To make the changes effective without having to reboot issue the following as root:

sysctl net.inet.gre.allow=1
sysctl net.inet.gre.wccp=1
sysctl net.inet.mobileip.allow=1
pfctl -f /etc/pf.conf

Improving the speed of a SawTooth G4 PowerMac

Disable the onboard Broadcom chipset network card & stick a Intel i82558B chipset network card in the system, I used a Compaq NC3121 which can be picked up off ebay for next to nothing. The card doesn’t specifically have to be i82558B based, I think OS X supports the entire range of the Intel chipsets supported under the *BSD fxp driver.

Brighton Chilli Is Born

I’ve made a Freesbie containing everything needed to get a chillispot based wifi hotspot up and running.

At the moment you need to tweak some of the config files by hand but I will hopefully manage to automate everything withing the next couple of releases

Check it out here

Chillispot PF Config & More

I have just submitted a PR to update my port for FreeBSD
The update contains a Install guide which covers install & config of Chillispot, Apache 1.3.x with mod_ssl, MySQL 4.1.x & freeRADIUS + A sample PF config file aswell as a IPFW config file & a RC startup script.
If you can’t wait till it’s merged into the tree you can grab a copy of the port from here

GnuCash for OS X

These packages are broken, I will upload the metapackages which include the dependenices when the option works in macports (it’s not atm!!), I apologize for wasting anyones time with these!!

Now that GnuCash is included with with Darwin Ports AKA MacPorts
I’ve made a precompiled disk image to make the installation that little bit easier (the dependency list is quiet big & it takes a while to compile)
I’ve also tweaked the original GnuCash Launcher Michael Elliot made so it works with the version of GnuCash made with Darwin Ports / MacPorts (his version was for Fink & the drag & drop file feature didn’t work on tiger)
You can grab the moded launcher here

You’ll need to install the Apple X Server from your OS X Install disks if you want to use the Launcher.
To use GnuCash you’ll need a X Server installed, either the Apple version from your OS X Disks or XFree86 from Fink or Darwin Ports AKA MacPorts
You can grab a precompiled version of XFree86 4.5.0 from here

Spamd Statistics

After a quick google round I came across this post on misc@
Sadly the link is now dead, but a copy of the script was reposted onto misc@ again which is handy, I’ve also made a copy of the script available here

Anyway, so I copied the script onto one of my openbsd boxes & fired it up resulting in this rather impressive output:
Spamd statistics: (logfile: /var/log/spamd)
Host Seconds Connections (secs/conn)

great!, spamdb lists a huge list of IP addresses & this is all I’m able to get out of it??
After checking out /etc/syslog.conf I found that I hadn’t added the entry for logging spamd when I reformatted, a quick edit & a kill -HUP later things looked much better! 🙂

Spamd statistics: (logfile: /var/log/spamd)
Host Seconds Connections (secs/conn) 12 1 12.00 24 1 24.00

WooHoo! GeekLAN’s 2nd Birthday

It’s be 2 years since the 1st went up on this site. Stay tuned as I post more about stuff I loose sleep over. Things on the short list of new stuff to play with are clusters (as soon as I can get a cheap array & some fibre channel cards!), redundent firewalls with CARP & some stuff on topics I haven’t covered yet (BeOS/YellowTAB, Tru64 & OpenVMS). I will also be rolling out another blog which will be more rant oriented in the next couple of days, the new blog will be called DustBinTin.

Is anyone even listening?! 😀

Syncing a Windows Mobile device with Thunderbird or Sunbird

Using FinchSync you can sync your Mozilla calander & email client (Netscape, Mozilla suite, Sunbird & Thunderbird are supported) with your PocketPC or Windows Mobile device. The tool comes in two parts, a client & server, the server is written in Java & is platform independent (well aslong as you you’ve got a jvm for your chosen platform! :P) & the client is in C#, which you install onto your PDA or smartphone.
The server runs on OS X without any problems aslong as you remember to change the default port to listen on as OS X blocks anything below 1024.

Me & my Axim X50

Well, it’s just a little over a year since I got my Axim X50 PDA & I have finally put it to good use. After a couple of plays with PocketMac Pro I purchased my license for Missing Sync from Mark/Space

Though PocketMac Pro had a couple of really usefull features which aren’t included in Missing Sync (extract .cab files from .exe’s & sync iTunes library), Life is so much better with Missing Sync. Missing Sync is soooooo much more stable for starters (I’m running a alpha version of Missing Sync aswell), it also allows doesn’t get confused if you factory reset your pda & try to re-sync it. I was never able to re-sync my pda with pocketmac if I let my battery run flat, I’d have to uninstall Pocketmac & re-install so that It’d give me the option to scan for a device & install its sync components onto the device.
Another problem with PocketMac was that it was extremely unstable when used with wifi & bluetooth usually causing the system to panic!!

I have also upgraded my Axim to Windows Mobile 5 which kinda makes PocketMac redundent as they still don’t support it!

Dovecot on OpenBSD file_lock_dotlock() errors

If after installing Dovecot on OpenBSD you get the following error when you try to access your mailbox:
open(/var/mail/ failed: Permission denied
file_lock_dotlock() failed with mbox file /var/mail/user: Permission denied

then uncomment & change the mbox_write_locks entry in /etc/dovecot from mbox_write_locks = dotlock fcntl to mbox_write_locks = fcntl

Everything should spring to life afterwards! 🙂

Running Chillispot on OpenBSD, NetBSD & Mac OS X

*** 08/07/06 – Update, the patch just allows Chillispot to build successfully, tun.c needs some more patching before chillispot will work. Sorry 🙁 ***

I have made a patch which will enable Chillispot compile & run on OpenBSD, NetBSD & Mac OS X.

The patch has been tested working on the following versions of O/S’s
OpenBSD 3.9
Mac OS X 10.4.7
though it should work on previous versions aswell.

To build Chillipot 1.0 first download & extract Chillispot.
Then copy the patch into the Chillispot directory & issue:
patch -p1 < chillispot -1.0.patch

You should get the following result:
patching file src/chilli.c
patching file src/dhcp.c
patching file src/redir.c
patching file src/syserr.c
patching file src/tun.c

For NetBSD & OpenBSD:
Now run ./configure with the relevant switches e.g.
./configure --sysconfdir=/etc --localstatedir=/var
then for OpenBSD: run make install chilli_LDFLAGS=""

For Mac OS X:
Run make install chilli_LDFLAGS="-lcrypto -lresolv"
If compiling fails with the following error:
redir.c: In function 'redir_accept':
redir.c:1400: error: nested functions are not supported on MacOSX
redir.c:1406: error: nested functions are not supported on MacOSX
make[2]: *** [redir.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

then you’re using GCC 4.0.1, use gcc_select to switch to GCC 3.3 by running gcc_select 3.3 then rerunning make. When you’re done you can switch back to GCC 4 by running gcc_select 4.0 surprise surprise!!! 🙂

New addition to the toy collection, Sun Blade 100 Workstation

Picked up a Sun Blade 100 at a bargain price just because the seller thought the unit was dead cause they didn’t plug a Sun keyboard into it!
After sticking 2x128MB ECC PC100 Dimms into it and powering up this came out of the console:
Sun Blade 100 (UltraSPARC-IIe), No Keyboard
OpenBoot 4.0, 256 MB memory installed, Serial #50638801.
Ethernet address 0:3:ba:5:a4:2, Host ID: 8305a402.