How to Install RANCID on OpenBSD

RANCID (Really Awesome New Cisco confIg Differ) is an open-source tool that monitors changes to network device configurations. In this tutorial, we will install RANCID on OpenBSD.

Prerequisites

Before we begin, make sure that you have the following:

Steps

  1. Open the terminal and log in as the root user.

  2. Run the pkg_add command to install the necessary packages:

pkg_add -i rancid
  1. Create the RANCID configuration file:
cp /usr/local/etc/rancid/rancid.conf.sample /usr/local/etc/rancid/rancid.conf
  1. Open the configuration file with your favorite text editor:
vi /usr/local/etc/rancid/rancid.conf
  1. Modify the following lines in the configuration file:
LIST_OF_GROUPS="router-switch"
LIST_OF_DEVICES="/usr/local/etc/rancid/router.db"
  1. Create the device configuration file:
cp /usr/local/etc/rancid/router.db.sample /usr/local/etc/rancid/router.db
  1. Open the device configuration file and add your devices:
vi /usr/local/etc/rancid/router.db

The configuration file should look like this:

# GroupName:DeviceType:IP:DeviceName
router-switch:cisco:192.168.0.1:MySwitch
router-switch:cisco:192.168.0.2:AnotherSwitch
  1. Create the RANCID data directory:
mkdir /var/rancid
  1. Modify the RANCID ownership and permissions:
chown -R rancid:rancid /var/rancid && chmod 2755 /var/rancid
  1. Initialize RANCID:
sudo -u rancid /usr/local/bin/rancid-run
  1. Verify that RANCID is running:
tail -f /var/log/rancid/rancid.log

You should see output similar to this:

starting: Mon Feb  1 15:39:47 EST 2021
RANCID: Found clogin (/usr/local/bin/clogin)
RANCID: Found /usr/local/bin/cloginrc file
router-switch:skipping aldoh04 (user defined excluded)
router-switch:skipping aldoh31 (user defined excluded)
router-switch:skipping nrtisw04 (user defined excluded)
router-switch:skipping nrtisw05 (user defined excluded)
router-switch:skipping nrtisw17 (user defined excluded)
router-switch: End Time: Mon Feb  1 15:40:06 EST 2021
Router Run completed at Mon Feb  1 15:40:06 EST 2021

Congratulations! You have successfully installed RANCID on OpenBSD. Now you can monitor and track changes to your network devices.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!