Hire Tom
Mostly Mozart



Snippets and snoppets picked up along the way...

Dollars per byte  (October 12, 2013)  Not sure how much data you'll need? You might be surprised by how much money your cellular provider will need. [dollarsperbyte]

Xen 4.1 guest config for monowall  (May 12, 2013)  Use generic-pc-serial image, patch to name ioemu vifs. [xen-monowall]

kernel postinst.d zz-update-grub fail  (March 30, 2013)  grub: "entry not specified." zz-update-grub: exit 1. [zz-update-grub-fail]

Pizza per dollar  (March 17, 2013)  Pizza: dollars per square foot. [pizzaperdollar]

Ubuntu 64 quantal vs. Macbook audio  (November 27, 2012)  No sound? Plugging in headphones mutes speakers but does not produce sound in headphones? [macbook-quantal-sound]

Apache double reverse dns lookups  (October 29, 2011)  I wish I could tell Apache never to do DNS lookups. [apache-double-reverse]

Configure authenticated snmpv3 service using net-snmp  (April 1, 2009) 

Set up snmpv3 authentication and privacy in net-snmp so you can monitor remotely with cacti without exposing everything to everybody.


Force gnome to use ssh-agent instead of gnome-keyring-daemon  (March 31, 2009) 

Use ssh-agent instead of gnome-keyring-daemon in your gnome session.


Cacti vs. php4 and adodb  (March 17, 2009)  Fix cacti / adodb after upgrading debian etch to lenny. [cacti-adodb-php4]

warning: Setting locale failed  (March 16, 2009)  warning: Setting locale failed. [setting-locale-failed]

Install ezmlm on linux  (December 6, 2008)  Overcome 11 years of C compiler evolution with a perl one-liner. [ezmlm-linux]

Set up disk quotas in ubuntu  (March 19, 2008)  vi /etc/fstab; mount -o remount,usrquota /; quotacheck; quotaon -a; edquota [debian-quota]

eth0 renamed to eth1, eth2, eth3, ... in domU  (March 6, 2008)  domU works fine the first time. After reboot, eth0 doesn't exist. The xen virtual interface appears as eth1. After a second reboot, the interface appears as eth2, and so on. [xen-eth0-renamed]

PHP the KICS way  (October 3, 2007)  php 4.4.7 with suhosin patch ( set -ex cd /usr/ports/lang/php4 make fetch checksum cd /tmp rm -r php-4.4.7 tar xyf /usr/ports/distfiles/php-4.4.7.tar.bz2 cd php-4.4.7 zcat /usr/ports/distfiles/suhosin-patch-4.4.7-0.9.6.patch.gz | patch -p1 wget http ... [php-kics]

OS X - disable VPN default route  (September 28, 2007)  Equivalent to turning off the "use default gateway on remote network" checkbox in other PPTP clients. [nodefaultroute]

simple mrtg  (April 4, 2007)  Monitor network traffic on a remote machine which is running snmpd. [mrtg]

simple snmp  (April 4, 2007)  Set up snmpd on a machine so that some other machine can monitor its network traffic and stuff. [net-snmp]

Install Xen 3.0.3 with Ubuntu 6.06  (November 13, 2006)  (just a bunch of links to other pages) [xen3-ubuntu-dapper]

Installing SpamAssassin  (July 6, 2006)  cd /usr/ports/mail/p5-Mail-SpamAssassin make install # (turn on DomainKeys, SPF, etc.) cd /usr/local/lib/perl5/site_perl/*/Mail/SpamAssassin/Plugin (cd /tmp && fetch patch </tmp/spamd- ... [spamassassin]

Provide redundant VPN tunnels using m0n0wall  (February 10, 2006)  I haven't done this yet, but I'd like to. If you have money to spend on this problem, call me. [redundant-vpn]

Xcode remote installation  (January 30, 2006)  In order to compile and install unix software on your Mac OS X server, you need to install the Apple developer toolkit, "Xcode Tools". [xcode-remote-install]

PHP CGI with mini_httpd  (January 26, 2006)  mini_httpd + PHP is an easy way to write a web app with root access. Usually you want to avoid giving your web apps root access, but this time is special. [php-mini_httpd]

maildirpop3d + dovecot + regular users  (January 23, 2006)  Non-recommended way to offer user-controlled (maildirpop3d) and regular mailboxes at the same time using dovecot. [maildirpop3d-awfulhak]

Installing PHP as a commandline interpreter  (January 23, 2006)  It can be nice to have mod_php4 as well as a command line interpreter for doing #!/bin/php stuff. Let's install the command line version separately in /usr/local/php-cli/. [php-commandline]

Making Plesk run php programs outside http[s]docs  (June 29, 2005)  add to .../conf/vhost_ssl.conf
websrvmng --reconfigure-vhost
/etc/rc.d/init.d/httpd reload [plesk-symlink-php]

Racoon and SonicWall  (May 27, 2005)  Establish an IPsec VPN tunnel between SonicWall and racoon. [racoon-sonicwall]

FreeBSD network boot server  (April 18, 2005)  Boot diskless clients into FreeBSD using PXE. [pxe]

Serial port pinouts  (March 23, 2005)  Pin assignments for DB9 and DB25 serial ports. [pinouts]

Dynamic IP  (April 25, 2004)  How to run a dynamic IP registration service [dynip]

Installing qmail-qfilter  (March 15, 2004)  ... This is a quick guide to installing qmail-qfilter on a FreeBSD or similar system. ... qmail-qfilter provides a convenient way to pass each incoming email message through a series of filters, each of which may reject or modify the message. This ... [qmail-qfilter]

RewriteRule example  (February 3, 2004)  If does not exist, redirect to (Put this in an .htaccess file in your top-level web directory.) # .htaccess in root of RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f ... [rewriterule]

Mandy the Firewall  (January 25, 2004)  ... Duties: Internet gateway for two mutually inaccessible private networks DHCP server for both private networks DNS cache for both private networks MP3 logger CVSup server (for keeping the locals current with src and ports) ... Features: Dual ... [mandy]

Windows Media Player's Malformed HTTP Requests  (December 14, 2003)  Problem: ... When accessing HTTP streams, some versions of Windows Media Player (I tested version send HTTP/1.0 requests which are rejected by NetCache NetApp/5.5D1. ... For example, if I open using the "Open& ... [wmp-invalid]

Reading mail with vm  (September 22, 2003)  ... Install vm. cd /usr/ports/mail/vm make install clean ... If your POP3 server is and your POP3 username is foo, add this to ~/.emacs. ("pass" is just the word "pass", not your password!) (load-library "vm") (setq vm-spool-files ... [vm]

Tom's FreeBSD habits  (August 27, 2003)  ... Always install: kernel source bash psmisc screen rsync daemontools ucspi-tcp djbdns ... Almost always: ports collection emacs portupgrade qmail cvsup clockspeed ... In kernel: device pcm options IPFIREWALL options IPDIVERT ... In /etc/ ... [fbsdhabits]

Running nmbd under daemontools  (August 26, 2003) 


killall nmbd
exec env - PATH=/usr/local/bin:/usr/local/sbin fghack /usr/local/sbin/nmbd -D

Running smbd under daemontools  (August 26, 2003) 


killall smbd
rm -rf /var/spool/samba/*
exec env - PATH=/usr/local/bin:/usr/local/sbin fghack /usr/local/sbin/smbd -D

Installing qmail on linux  (August 23, 2003)  ...without an RPM. [qmail-linux]

Installing PHP 4.3.3 as a CGI with #! support  (August 22, 2003)  ... You want some sites ("foo.dom") to use "Action ... /php.cgi": -rw-r--r-- foo foo /home/foo/docroot/.htaccess -rwx------ foo foo /home/foo/docroot/php.cgi -rw-r--r-- foo foo /home/foo/docroot/example.php ... You want some other sites ("bar.dom ... [php-cgi]

Oracle 9i server behind a firewall with NAT  (August 21, 2003)  Put your Oracle 9i server behind a NAT router, and access it from the public side of the router. [oracle9i-nat]

Oracle 9i Client  (August 13, 2003)  ... Installing Oracle 9i client software on Windows 2000, connecting to a database called planb, which is running on a FreeBSD 5.1 machine called bsd5... "Service name" is "Host name" is "SID" is ... [oracle9i-client]

Running Oracle 9i on FreeBSD 5.1  (August 11, 2003)  ... Don't even bother trying to run the Oracle installer on FreeBSD. ... Instead, NFS-mount the BSD disk from a Linux box and use the Linux system to install Oracle. ... Once it is working on the Linux box, tune your FreeBSD kernel according to ... [oracle9i-bsd5]

Installing Oracle 9i on Linux  (August 6, 2003)  Installing Oracle 9i on a Linux machine with the wrong version of Red Hat (7.3) and insufficient disk space (4 GB). [oracle9i]

A simple watchdog script  (August 1, 2003)  ... Send email messages (eg. to a cell phone) when a machine on the LAN is unreachable. ... In /var/service/watchdog/run ... #!/bin/sh while sleep 60 do for ip in do if ping -c 1 -t 2 $ip >/dev/null ... [smalldog]

Installing Adzap  (August 1, 2003)  ... To block most annoying banner ads and popups: Install squid. Install adzap. cd /usr/ports/www/adzap make install clean Install the default adzap configuration file. cp -i /usr/local/share/examples/adzap/adzap.conf /usr/local/etc/ Edit /usr/ ... [adzap]

Memory-based filesystems using md(4)  (August 1, 2003)  ... (FreeBSD 5) ... This makes a 64-megabyte filesystem in swap space, mounted at /cache. ... In /usr/local/etc/rc.d/ ... #!/bin/sh echo -n ' md ' case "$1" in start) md=`mdconfig -a -t swap -s 64m` newfs "/dev/$md" mount /dev/$ ... [md]

Installing SuSE 7.3  (July 24, 2003)  ... Here are a few notes made while installing SuSE on an i386 system. I used a 550 MHz Pentium III, two 4 GB Western Digital WDE4550 SCSI disks, two Adaptec 2940 SCSI controllers, and a 3com 905B network card. Download three floppy images: ... [suse73]

Disk On Module  (June 7, 2003)  ... Choose master/slave by using a different power connector. ... Write speed: 1.4 MBytes/s # time dd if=/dev/zero of=zero bs=1048576 count=20 20+0 records in 20+0 records out 20971520 bytes transferred in 14.595191 secs (1436879 bytes/sec) 0.000u ... [diskonmodule]

Cloning a FreeBSD system  (June 6, 2003)  ... Simplifying by assuming a single partition, a secure network, and ucspi-tcp already installed on ORIG... ... Install fresh hard disk in CLONE, and boot from a FreeBSD rescue floppy. ... Rather than installing, go to the "configure" submenu and ... [freebsdclone]

Building a FreeBSD router on a 256M disk  (June 3, 2003)  ... Assemble the computer. Put the solid state hard disk on the primary ATA controller, and a bootable CD-ROM drive on the second controller. ... BIOS setup: date/time = current UTC date/time floppy A = none hard disk C = auto detect halt on = no ... [256-router]

Storing a filesystem in a file using vn(4)  (May 18, 2003)  ... Create 100 megabyte filesystem, stored in /home/test.ufs, mounted at /mnt time dd </dev/zero >/home/test.ufs bs=1000000 count=100 (cd /dev && sh MAKEDEV vn1) vnconfig -s labels -c /dev/vn1c /home/test.ufs disklabel -r -w vn1 auto newfs / ... [vn-file]

supervise tcpserver qmail-smtpd  (May 18, 2003)  Set up a supervised qmail smtp daemon. [svc-smtpd]

/usr/local/etc/supfile.*  (May 18, 2003)  ... ned:/usr/local/etc/supfile.ports *default tag=. *default *default prefix=/usr *default base=/usr/local/etc/cvsup *default release=cvs delete use-rel-suffix compress ports-all ... ned:/usr/local/etc/supfile.src *default ... [supfile]

Squid transparent proxy  (May 5, 2003)  Set up squid as a transparent web proxy using FreeBSD. [squid-tproxy]

Create a PNG image with PHP  (May 4, 2003)  # Compile PHP with bundled GD library: cd /tmp tar xyf /usr/local/src/php-4.3.1.tar.bz2 cd php-4.3.1 './configure' '--with-gd' '--with-mysql=/usr/local' \ '--with-mhash=/usr/local' '--with-mcrypt=/usr/local' \ '--enable-sockets' '--enable-trans-sid ... [php-image]

How to replace the stereo in a Toyota  (September 11, 2001)  This page might help you if you have a 2002 Corolla, 1992 Tercel, 1993 pickup, or similar. [toyotastereo]