Adding regular FreeBSD repos to pfsense

The concensus seems to be that adding any software to your router is a bad idea, however, it is clear that pfsense has added software to their router, for instance, they add vim (a conceptually outdated editor that requires practice to use and is difficult for all but old hat Unix stalwarts to use). One other is that pfsense uses a very outdated shell. They use /bin/sh. Most distributions of Linux and such have moved on to products such as zsh (Apple does with their version of BSD), and bash (which itself is infrequently updated and quite dated).

I set out to be able to get zsh installed for my account (can only get in with RSA keys), to allow me to do a bit more and have a more pleasant shell experience. I’ve already enabled history in the shell which is also something that the pfsense devs have turned off.

In order to get this to work you have to enable the normal FreeBSD repos.

This does work in pfSense 2.6 (and apparently 2.3.2):

  1. Make sure “enabled” key is set to “yes” in /etc/pkg/FreeBSD.conf
  2. Change “enabled: no” to “enabled: yes” in /usr/local/etc/pkg/repos/FreeBSD.conf
  3. Change “enabled: no” to “enabled: yes” in /usr/local/etc/pkg/repos/pfSense.conf for FreeBSD repo
  4. Now you’re able to install packages from FreeBSD official repo

The first one needed no change. I looked for the key but there wasn’t one so I just exited the editor

#2 and #3 do work if you edit the single line that says enabled: no and change it to enabled: yes.

After this you can return to the prompt and type pkg install zsh.