Would you like to learn how to monitor OPNsense using Zabbix via SNMP? In this tutorial, we are going to show you how to configure SNMP on OPNsense and how to monitor an OPNsense firewall using the Zabbix server.

• OPNsense 19.7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

OPNsense – SNMP Installation

Open a browser software, enter the IP address of your Opnsense firewall and access web interface.

In our example, the following URL was entered in the Browser:

• https://192.168.15.11

The opnsense web interface should be presented.

opnsense login

On the prompt screen, enter the OPNsense Default Password login information.

• Username: root
• Password: Password set during OPNsense the installation

After a successful login, you will be sent to the OPNSense Dashboard.

opnsense dashboard

Access the Opnsense System menu, access the Firmware sub-menu and select the plugins option.

opnsense plugins

Locate and install the SNMP plugin named: OS-NET-SNMP

opnsense snmp installation

To enable the SNMP configuration area, you will need to logoff and login again.

Wait the net-snmp installation to finish.

To enable the SNMP configuration area, you will need to logoff and login again.

Access the Opnsense Services menu and select the NET-SNMP option.

opnsense net-snmp

On the General tab, perform the following configuration.

• Enable SNMP service – Yes
• SNMP Community –  Enter a SNMP community name
• Layer 3 visibility – Yes

Optionally, you may set a SNMP contact and a SNMP location.

opnsense snmp configuration

Click on the Save button on the botton part of the screen.

In our example, we set a snmp community named GokuBlack.

You have successfully enabled the Opnsense SNMP service using the NET-SNMP package.

Tutorial Zabbix – Monitoring OPNsense via SNMP

Now, we need to access the Zabbix server dashboard and add the Linux computer as a Host.

Open your browser and enter the IP address of your web server plus /zabbix.

In our example, the following URL was entered in the Browser:

• http://192.168.15.10/zabbix

On the login screen, use the default username and default password.

• Default Username: Admin
• Default Password: zabbix

zabbix login

After a successful login, you will be sent to the Zabbix Dashboard.

Zabbix 4.4 dashboard

On the dashboard screen, access the Configuration menu and select the Host option.

zabbix add host

On the top right of the screen, click on the Create host button.

Zabbix Create Host

On the Host configuration screen, you will have to enter the following information:

• Host Name – Enter a Hostname to identify the OPNsense server.
• Visible Hostname – Repeat the hostname.
• New group – Enter a name to identify a group of similar devices.
• Agent Interface – Click on the Remove button.
• SNMP Interface – Click on the Add button and enter the IP address of the OPNsense server.

Here is the original image, before our configuration.

zabbix add host

Here is the new image with our configuration.

zabbix opnsense monitor

Next, we need to configure the SNMP community that Zabbix will use to connect on the OPNsense firewall.

Access the Macros tab on the top of the screen.

Create a macro named: {$SNMP_COMMUNITY}

The {$SNMP_COMMUNITY} macro value should be the OPNsense SNMP community.

Zabbix SNMP Macro Linux

In our example, the {$SNMP_COMMUNITY} value is GokuBlack

Next, we need to associate the host with a specific network monitor template.

By default, Zabbix comes with a large variety of monitoring templates.

Access the Templates tab on the top of the screen.

Locate and select the template named: Template Net Network Generic Device SNMPv2

zabbix snmp device template

After a few minutes, you will be able to see the initial result on the Zabbix Dashboard.

The final result will take at least one hour.

By default, Zabbix will wait 1 hour to discover the number of interfaces available on the OPNsense server.

By default, Zabbix will wait 1 hour before collect information from the network interfaces.

Congratulations! You have configured the Zabbix server to monitor a OPNsense firewall using SNMP.

Keep in mind that we are monitoring the OPNsense firewall using the LAN interface, therefore, we do not need to create firewall rules to allow the SNMP connection.