Clearing Ubiquiti UniFi USG DNS entries

Another post to save Future Howard the trouble of trying to remember how to fix a problem: when the DNS server in the USG-PRO has cached an old or invalid IP for a host. To verify:

  • SSH to the USG-PRO itself (not the Cloud Key/Controller).
  • To see the list of IPs it has stored, with the incorrect entry:
    cat /etc/hosts
  • To edit (elevated) and remove the offending line
    sudo vi /etc/hosts
  • And to ensure the DNS service forgets the incorrect value:
    clear dns forwarding cache

You’re welcome, Future Howard.

Raspberry Pi as UniFi Controller

Our last house was big. Or at least, long. Long enough that your average router’s built-in WiFi wouldn’t reach every room properly. Since we moved in to that house in 2013, the wireless network I built predated today’s wonderful collection of mesh-based WiFi systems. The likes of the Netgear Orbi, Linksys Velop and Google Wifi devices didn’t yet exist. So I bought a bunch of Ubiquiti‘s UniFi kit (four access points in total) and spread them through the house.

This setup wasn’t as seamless or quick to set up as these new systems appear to be, but once configured it has been rock solid. The controller for these devices started life as the default install of Ubiquiti’s Java app on a Windows server, then later as a Docker image on a Synology Diskstation. For various reasons (mostly to do with constrained bandwidth) I’m not running that Synology or a powerful permanent server in the new house, but I still wanted a controller for the UniFi kit – especially as I intend to try their USG as a gateway device.

So, what were my options? Continue reading

ZoneMinder Control Script for Foscam FI8918W

Update 27/02/2011: Added IR control and password passthrough.
I’ve recently put together a CCTV solution using a few Foscam FI8918W cameras and the excellent ZoneMinder software. This is all running on a CentOS 5.5 virtual machine under Hyper-V (more on this setup another time). The Foscam cameras have pan, tilt and the ability to set and move to preset locations. Continue reading