Foxpro: Not a database file.

After a crash, Foxpro complained that a dbf was not a database file. Turns out this was due to an incorrect record count in the .dbf header. Bytes 04-07 in the header contain the record count and it seems that if this does not match the expected file size Foxpro complains. Calculate the correct record count and use a hex editor to alter the header.

Bytes 08-09 in the header are a pointer to the first record (Header size)
Bytes 10-11 contain the size of one record.

The record count can be calculated from this, although I was able to use LibreOffice base to open the .dbf. This does not complain if the file size does not match the record count.

Squid on pfSense 2.3

After upgrading to pfSense 2.3 it was evident that squid just wasn’t working.

It’s now working fine after….

Stopping the service. Clearing the squid folder under /var/squid.

And then…

Setting authentication to local – which didn’t work when the correct username and passwords were entered.
And then setting auth back to none – Bingo, we can get through squid.

Using vHosts on pfSense

My way of using vHhosts on pfSense involves Squid reverse proxy, DNS and vHosts.

Make sure you’ve got the Squid3 and vHosts packages installed.

Admin Access

First, the pfSense web gui should be on a port other than 80 or 443. This should be done as a matter of course anyway (use https on port 8443 maybe).


We need to play around with the Squid Reverse Proxy settings.

Make sure Enable HTTP Reverse Proxy is ticked, and the Reverse HTTP Port is set to 80. Do the same for HTTPS on port 443 if you need to.

Squid Peers

Peer server

Now move over to the Web Servers tab, and add a new web server (A Peer). We are going to add a reference to the pfSense box – where the vHosts server is running. We are telling squid that there is a peer server names pfSense running on localhost ( and listening at port 10081.



Choose the Mappings tab and add a new mapping. We are telling squid, that when it receives a request for a particular URI, to forward that request on to another server. Choose whatever you want for the Group Name and Group Description. From the Peers list, chose the peer server we defined above. In the lower URI’s section, enter the address of the web pages you want to host (eg., this will correspond with each vHost we define later.


So now we create a vHost for each site we will be hosting. Add a new vHosts with the Host name being a URI we entered earlier. The IP Address will be Port will be 10081 as we defined earlier in the Squid Peers section. Set Enabled to true and enter a description if you want.


Whichever DNS system you are using, you will need to add an entry for the URI’s for each vHost to hit your pfSense host box.


To make sure everything is updated, restart your Squid and vHost services. Point your browser to on of the sites you’ve defined and things should work…. they did for me.

Checking and securing is down to you..

Setting up IPX and NCPFS on Ubuntu 14.04

It seems that packages are not published yet for 14.04, so if you need to string together a Novell 3.12 server and Linux for some reason, this may help.

The packages from the Maverick release work perfectly.

So visit and download the following files.

  • ipx_2.2.6-8_amd64.deb
  • libncp_2.2.6-8_amd64.deb
  • libpam-ncp_2.2.6-8_amd64.deb
  • ncpfs_2.2.6-8_amd64.deb

The best way to do this (if you’re unsure) is to use wget from a console, just copy the download links from the page and paste so you end up with


Then install the packages as root.

sudo dpkg -i ipx_2.2.6-8_amd64.deb
sudo dpkg -i libncp_2.2.6-8_amd64.deb
sudo dpkg -i libpam-ncp_2.2.6-8_amd64.deb
sudo dpkg -i ncpfs_2.2.6-8_amd64.deb

Now if you’re attached to a Novell server typing the command slist as root should show it.

There are plenty of tutorials on how to mount a Netware drive, or use pserver to use your linux box as a Netware printer server.

This post was mainly a record for myself.

10 hours later 

After 10 hours of rail travel, stage one is complete. A smooth journey, with only one minor delay which luckily didn’t result in a missed connection. We passed into Cornwall over the Taymar bridge thinking we were nearly there; wrong. It takes a long time to get to the end of the earth. Our journey was most pleasant (trying to sound like Michael Portillo and his great British railway journey) and shared with some most delightful fellow passengers with one kind lady donating to our cause: maybe she felt responsible for the weather which seemed ‘set in’ as we left Bodmin. If the lady in question happens to read this, please drop us an email so that we might keep in touch. 

So. The rain WILL clear by tomorrow morning and as it’s not stopping it’s dinner and beverages in the hotel.  


Where do we finish?

John O’Groats is not the end of the Earth – Just look on the map: so….

We will obviously go to the famous car park with the sign you have to pay to get a photo with, but there are other options.

Duncansby Head Lighthouse, to me is further to the ‘top right’, and only 2 miles from John O’Groats.

Most Northerly point on the UK mainland is  Dunnet Head which might be worth a detour ?


Answers on a postcard