1.8. Installing supplementary tools

Apart from the various (relatively) big software packages like PHP or isc-dhcp that make m0n0wall what it is, there's a range of small helper tools, usually written in C by one of the m0n0wall developers, that need to be compiled. These tools handle things that either can't be done in PHP at all, or only inefficiently. This section explains how to compile and install them.

Download the supplementary tools from http://m0n0.ch/wall/downloads/freebsd-4.11/tools.tgz.

1.8.1. choparp

choparp is an ARP proxy daemon. m0n0wall uses a customized version that supports address ranges, rather than just single addresses and subnets. Install as follows:

gcc -o choparp choparp.c
install -s choparp $MWROOT/usr/local/sbin

1.8.2. atareinit

This simple tool reinitializes ATA drive controllers and is required for the IDE HD standby feature.

gcc -o atareinit atareinit.c
install -s atareinit $MWROOT/usr/local/sbin

1.8.3. stats.cgi

The SVG-based traffic and CPU load graphs in the webGUI call a CGI through the web server to get the information. For efficiency, this CGI is written in C rather than PHP since it's invoked once every second while the graph is being displayed. Install as follows:

gcc -o stats.cgi stats.c
install -s stats.cgi $MWROOT/usr/local/www

1.8.4. minicron

minicron is a very simple daemon that invokes a command at regular intervals. The captive portal uses this to prune expired user sessions. Install as follows:

gcc -o minicron minicron.c
install -s minicron $MWROOT/usr/local/bin

1.8.5. verifysig

This tool uses the OpenSSL libraries to check the digital signature of an uploaded firmware image using /etc/pubkey.pem. Install as follows:

gcc -o verifysig -lcrypto verifysig.c
install -s verifysig $MWROOT/usr/local/bin

1.8.6. runmsntp.sh

MSNTP has the bad habit of exiting sometimes (e.g. when it can't contact a time server for awhile), so we need a simple shell script to restart it if it dies. Install as follows:

install runmsntp.sh $MWROOT/usr/local/bin

1.8.7. linkup scripts

A few shell scripts need to be provided for MPD to invoke when a PP(T)P connection is established or torn down:

install ppp-linkup vpn-linkdown vpn-linkup $MWROOT/usr/local/sbin