I have been confronted with the following problem: after a diskette failure,
the m0n0wall was no longer manageable and the backup of config.xml was not
up to date!
Fortunately I could still connect at https://m0n0wall/exec.php. As I didn't
find any information on the web, here's what I did:
On the exec.php page, type the command "cat /tmp/config.cache" (of course,
do not something like cat /conf/config.xml, it doesn't work because the
diskette is broken)
Put its content (a single line) in a file nammed config.cache (I used vi,
gedit has some trouble with this very long line of text, I don't test with
In the same folder, write the following php script :
$config = unserialize(file_get_contents("config.cache"));
$xmlconfig = dump_xml_config($config, $g['xml_rootobj']);
Name this script prog.php
Recover the files globals.inc, util.inc and xmlparse.inc from another
m0n0wall running the same version or from the corresponding rootfs
distribution. You should have in the folder : config.cache, prog.php,
globals.inc, util.inc and xmlparse.inc.
Run the php script: $ php prog.php
If everything goes well, you must retrieve the file config.xml.
I hope that this mini-howto may help somebody encountering the same problem.