1145184Sglebius# $FreeBSD$ 2145184Sglebius# 3145184Sglebius# Example configuration file for bsnmpd(1). 4145184Sglebius# 5145184Sglebius 6145184Sglebius# 7145184Sglebius# Set some common variables 8145184Sglebius# 9145184Sglebiuslocation := "Room 200" 10155768Scericontact := "sysmeister@example.com" 11145184Sglebiussystem := 1 # FreeBSD 12155458Sglebiustraphost := localhost 13145184Sglebiustrapport := 162 14145184Sglebius 15216300Ssyrinx# 16216300Ssyrinx# Set the SNMP engine ID. 17216300Ssyrinx# 18216300Ssyrinx# The snmpEngineID object required from the SNMPv3 Framework. If not explicitly set via 19216300Ssyrinx# this configuration file, an ID is assigned based on the value of the 20216300Ssyrinx# kern.hostid variable 21216300Ssyrinx# engine := 0x80:0x10:0x08:0x10:0x80:0x25 22216300Ssyrinx# snmpEngineID = $(engine) 23216300Ssyrinx 24145184Sglebius# Change this! 25145184Sglebiusread := "public" 26165685Smaxim# Uncomment begemotSnmpdCommunityString.0.2 below that sets the community 27165685Smaxim# string to enable write access. 28145184Sglebiuswrite := "geheim" 29145184Sglebiustrap := "mytrap" 30145184Sglebius 31216595Ssyrinx# 32216300Ssyrinx# Declarations for SNMP-USER-BASED-SM-MIB authentication and privacy options 33216595Ssyrinx# 34216595Ssyrinx 35216300SsyrinxNoAuthProtocol := 1.3.6.1.6.3.10.1.1.1 36216300SsyrinxHMACMD5AuthProtocol := 1.3.6.1.6.3.10.1.1.2 37216300SsyrinxHMACSHAAuthProtocol := 1.3.6.1.6.3.10.1.1.3 38216300SsyrinxNoPrivProtocol := 1.3.6.1.6.3.10.1.2.1 39216300SsyrinxDESPrivProtocol := 1.3.6.1.6.3.10.1.2.2 40216300SsyrinxAesCfb128Protocol := 1.3.6.1.6.3.10.1.2.4 41216300Ssyrinx 42145184Sglebius# 43216595Ssyrinx# Enumerations from SNMP-FRAMEWORK-MIB 44216595Ssyrinx# 45216595Ssyrinx 46216595Ssyrinx# Security models 47216595SsyrinxsecurityModelAny := 0 48216595SsyrinxsecurityModelSNMPv1 := 1 49216595SsyrinxsecurityModelSNMPv2c := 2 50216595SsyrinxsecurityModelUSM := 3 51216595Ssyrinx 52216595Ssyrinx# Message Processing models 53216595SsyrinxMPmodelSNMPv1 := 0 54216595SsyrinxMPmodelSNMPv2c := 1 55216595SsyrinxMPmodelSNMPv3 := 3 56216595Ssyrinx 57216595Ssyrinx# Security levels 58216595SsyrinxnoAuthNoPriv := 1 59216595SsyrinxauthNoPriv := 2 60216595SsyrinxauthPriv := 3 61216595Ssyrinx 62216595Ssyrinx 63216300Ssyrinx# SNMPv3 USM User definition 64216300Ssyrinx# 65216300Ssyrinx# The localized hex password for a user may be obtained by setting SNMPUSER, SNMPPASSWD, 66216300Ssyrinx# SNMPAUTH and SNMPPRIV environment variables to the desired parameters and invoking 67216300Ssyrinx# 'bsnmpget -v 3 -D -K -o verbose' against the running bsnmpd(1). For other 68216300Ssyrinx# usages refer to the bsnmpget(1) manual page. The following lines define a user "bsnmp" 69216595Ssyrinx# with a private password "bsnmptest", localized for the above engine ID. 70216300Ssyrinx# 71216595Ssyrinx#user1 := "bsnmp" 72216595Ssyrinx#user1passwd := 0x22:0x98:0x1a:0x6e:0x39:0x93:0x16:0x5e:0x6a:0x21:0x1b:0xd8:0xa9:0x81:0x31:0x05:0x16:0x33:0x38:0x60 73216300Ssyrinx 74216300Ssyrinx# 75145184Sglebius# Configuration 76145184Sglebius# 77145184Sglebius%snmpd 78145184SglebiusbegemotSnmpdDebugDumpPdus = 2 79145184SglebiusbegemotSnmpdDebugSyslogPri = 7 80145184Sglebius 81154186Sharti# 82154186Sharti# Set the read and write communities. 83154186Sharti# 84154186Sharti# The default value of the community strings is NULL (note, that this is 85154186Sharti# different from the empty string). This disables both read and write access. 86154186Sharti# To enable read access only the read community string must be set. Setting 87154186Sharti# the write community string enables both read and write access with that 88154186Sharti# string. 89154186Sharti# 90154186Sharti# Be sure to understand the security implications of SNMPv2 - the community 91154186Sharti# strings are readable on the wire! 92154186Sharti# 93145184SglebiusbegemotSnmpdCommunityString.0.1 = $(read) 94154186Sharti# begemotSnmpdCommunityString.0.2 = $(write) 95145184SglebiusbegemotSnmpdCommunityDisable = 1 96145184Sglebius 97145184Sglebius# open standard SNMP ports 98163823ShartibegemotSnmpdPortStatus.0.0.0.0.161 = 1 99145184Sglebius 100145184Sglebius# open a unix domain socket 101145184SglebiusbegemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1 102145184SglebiusbegemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4 103145184Sglebius 104145184Sglebius# send traps to the traphost 105145184SglebiusbegemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 106145184SglebiusbegemotTrapSinkVersion.[$(traphost)].$(trapport) = 2 107145184SglebiusbegemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap) 108145184Sglebius 109145184SglebiussysContact = $(contact) 110145184SglebiussysLocation = $(location) 111145184SglebiussysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) 112145184Sglebius 113145184SglebiussnmpEnableAuthenTraps = 2 114145184Sglebius 115145184Sglebius# 116216300Ssyrinx# SNMPv3 User-based security module - must be loaded for SNMPv3 USM 117216300Ssyrinx# 118216300Ssyrinx#begemotSnmpdModulePath."usm" = "/usr/lib/snmp_usm.so" 119216300Ssyrinx 120216300Ssyrinx# 121216300Ssyrinx# SNMPv3 USM User definition. 122216300Ssyrinx# 123216300Ssyrinx 124216300Ssyrinx#%usm 125216300Ssyrinx 126216300Ssyrinx# 127216300Ssyrinx# The following block creates a user with name "bsnmp" and sets privacy 128216300Ssyrinx# and encryption options to SHA256 message digests and AES encryption 129216300Ssyrinx# for this user. 130216300Ssyrinx# 131216300Ssyrinx# usmUserStatus.$(engine).$(user1) = 5 132216300Ssyrinx# usmUserAuthProtocol.$(engine).$(user1) = $(HMACSHAAuthProtocol) 133216300Ssyrinx# usmUserAuthKeyChange.$(engine).$(user1) = $(user1passwd) 134216300Ssyrinx# usmUserPrivProtocol.$(engine).$(user1) = $(AesCfb128Protocol) 135216300Ssyrinx# usmUserPrivKeyChange.$(engine).$(user1) = $(user1passwd) 136216300Ssyrinx# usmUserStatus.$(engine).$(user1) = 1 137216300Ssyrinx# 138216300Ssyrinx 139216300Ssyrinx# 140216300Ssyrinx# The following block creates a user with name "public" with no authentication 141216301Ssyrinx# or encryption options. 142216300Ssyrinx# 143216300Ssyrinx# usmUserStatus.$(engine).$(read) = 5 144216300Ssyrinx# usmUserAuthProtocol.$(engine).$(read) = $(NoAuthProtocol) 145216300Ssyrinx# usmUserPrivProtocol.$(engine).$(read) = $(NoPrivProtocol) 146216300Ssyrinx# usmUserStatus.$(engine).$(read) = 1 147216300Ssyrinx# 148216300Ssyrinx 149216300Ssyrinx# 150216300Ssyrinx# SNMPv3 View-based Access Control module 151216300Ssyrinx# 152216300Ssyrinx#begemotSnmpdModulePath."vacm" = "/usr/lib/snmp_vacm.so" 153216300Ssyrinx 154216300Ssyrinx# 155216300Ssyrinx# Definition of view-based access control entries. 156216300Ssyrinx# 157216300Ssyrinx#%vacm 158216300Ssyrinx 159216300Ssyrinx# Definition of a SNMPv1 group 160216595Ssyrinx# vacmSecurityToGroupStatus.$(securityModelSNMPv1).$(read) = 4 161216595Ssyrinx# vacmGroupName.$(securityModelSNMPv1).$(read) = $(read) 162216300Ssyrinx 163216300Ssyrinx# Definition of SNMPv2 group 164216595Ssyrinx# vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(write) = 4 165216595Ssyrinx# vacmGroupName.$(securityModelSNMPv2c).$(write) = $(write) 166216300Ssyrinx 167216300Ssyrinx# Definition of SNMPv3 group with users "bsnmp" and "public" 168216595Ssyrinx# vacmSecurityToGroupStatus.$(securityModelUSM).$(user1) = 4 169216595Ssyrinx# vacmGroupName.$(securityModelUSM).$(user1) = $(write) 170216595Ssyrinx# vacmSecurityToGroupStatus.$(securityModelUSM).$(read) = 4 171216595Ssyrinx# vacmGroupName.$(securityModelUSM).$(read) = $(write) 172216300Ssyrinx 173216300Ssyrinx# 174216300Ssyrinx# The OID of the .iso.org.dod.internet subtree 175216300Ssyrinx# 176216300Ssyrinx# internetoid := 1.3.6.1 177216300Ssyrinx# internetoidlen := 4 178216300Ssyrinx 179216300Ssyrinx# 180216300Ssyrinx# Definitions of two views 181216300Ssyrinx# 182216300Ssyrinx# vacmViewTreeFamilyStatus."internet".$(internetoidlen).$(internetoid) = 4 183216300Ssyrinx# vacmViewTreeFamilyStatus."restricted".$(internetoidlen).$(internetoid) = 4 184216300Ssyrinx 185216300Ssyrinx# 186216300Ssyrinx# Access control 187216300Ssyrinx# 188216300Ssyrinx 189216300Ssyrinx# 190216300Ssyrinx# Read-only access for SNMPv1 users 191216300Ssyrinx# 192216595Ssyrinx# vacmAccessStatus.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = 4 193216595Ssyrinx# vacmAccessReadViewName.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = "internet" 194216300Ssyrinx 195216300Ssyrinx# 196216300Ssyrinx# Read-write access for SNMPv2 users 197216300Ssyrinx# 198216595Ssyrinx# vacmAccessStatus.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4 199216595Ssyrinx# vacmAccessReadViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" 200216595Ssyrinx# vacmAccessWriteViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" 201216300Ssyrinx 202216300Ssyrinx# 203216300Ssyrinx# Read-write-notify access for SNMPv3 USM users with noAuthNoPriv 204216300Ssyrinx# 205216300Ssyrinx# vacmAccessStatus.$(write)."".3.$(noAuthNoPriv) = 4 206216595Ssyrinx# vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" 207216595Ssyrinx# vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" 208216595Ssyrinx# vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" 209216300Ssyrinx 210216300Ssyrinx# 211216300Ssyrinx#Read-write-notify access to restricted for SNMPv3 USM users with authPriv 212216300Ssyrinx# 213216300Ssyrinx# vacmAccessStatus.$(write)."".3.$(authPriv) = 4 214216300Ssyrinx# vacmAccessReadViewName.$(write)."".3.$(authPriv) = "restricted" 215216300Ssyrinx# vacmAccessWriteViewName.$(write)."".3.$(authPriv) = "restricted" 216216300Ssyrinx# vacmAccessNotifyViewName.$(write)."".3.$(authPriv) = "restricted" 217216300Ssyrinx 218216595Ssyrinx# 219216595Ssyrinx# SNMPv3 Notification Targets 220216595Ssyrinx# 221216595Ssyrinx# begemotSnmpdModulePath."target" = "/usr/lib/snmp_target.so" 222216595Ssyrinx 223216595Ssyrinx#%target 224216595Ssyrinx# Send notifications to target tag "test" 225216595Ssyrinx# tag := "test" 226216595Ssyrinx# snmpNotifyRowStatus.$(tag) = 4 227216595Ssyrinx# snmpNotifyTag.$(tag) = $(tag) 228216595Ssyrinx 229216595Ssyrinx# tagremote := "testremote" 230216595Ssyrinx# snmpNotifyRowStatus.$(tagremote) = 4 231216595Ssyrinx# snmpNotifyTag.$(tagremote) = $(tagremote) 232216595Ssyrinx 233216595Ssyrinx# 234216595Ssyrinx# Specify the target parameters for the notifications - send with the credentials 235216595Ssyrinx# of user "bsnmp" 236216595Ssyrinx# 237216595Ssyrinx# snmpTargetParamsRowStatus.$(tag) = 5 238216595Ssyrinx# snmpTargetParamsMPModel.$(tag) = $(MPmodelSNMPv3) 239216595Ssyrinx# snmpTargetParamsSecurityModel.$(tag) = $(securityModelUSM) 240216595Ssyrinx# snmpTargetParamsSecurityName.$(tag) = $(user1) 241216595Ssyrinx# snmpTargetParamsSecurityLevel.$(tag) = $(authPriv) 242216595Ssyrinx# snmpTargetParamsRowStatus.$(tag) = 1 243216595Ssyrinx 244216595Ssyrinx# 245216595Ssyrinx# Define the notifications' target address - port 162 on localhost 246216595Ssyrinx# 247216595Ssyrinx# snmpTargetAddrRowStatus.$(tag) = 5 248216595Ssyrinx# snmpTargetAddrTAddress.$(tag) = 0x7f:0x0:0x0:0x1:0x0:0xa2 249216595Ssyrinx# snmpTargetAddrTagList.$(tag) = "test notification" 250216595Ssyrinx# snmpTargetAddrParams.$(tag) = $(tag) 251216595Ssyrinx# snmpTargetAddrRowStatus.$(tag) = 1 252216595Ssyrinx 253216595Ssyrinx# 254216595Ssyrinx# Define the notifications' target address - port 162 on 10.0.0.1 255216595Ssyrinx# 256216595Ssyrinx# snmpTargetAddrRowStatus.$(tagremote) = 5 257216595Ssyrinx# snmpTargetAddrTAddress.$(tagremote) = 0x0a:0x00:0x00:0x1:0x0:0xa2 258216595Ssyrinx# snmpTargetAddrTagList.$(tagremote) = $(tagremote) 259216595Ssyrinx# snmpTargetAddrParams.$(tagremote) = $(tag) 260216595Ssyrinx# snmpTargetAddrRowStatus.$(tagremote) = 1 261216595Ssyrinx 262216595Ssyrinx# 263216595Ssyrinx# Load MIB-2 module 264216595Ssyrinx# 265216595SsyrinxbegemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" 266216595Ssyrinx 267216595Ssyrinx# Force a polling rate for the 64-bit interface counters in case 268216595Ssyrinx# the automatic computation is wrong (which may be the case if an interface 269216595Ssyrinx# announces the wrong bit rate via its MIB). 270216595Ssyrinx#%mibII 271216595Ssyrinx#begemotIfForcePoll = 2000 272216595Ssyrinx 273216595Ssyrinx 274145184Sglebius# Netgraph module 275145184Sglebius# 276145184Sglebius#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" 277145184Sglebius# 278145184Sglebius#%netgraph 279145184Sglebius#begemotNgControlNodeName = "snmpd" 280145184Sglebius 281145184Sglebius# 282145184Sglebius# pf(4) module 283145184Sglebius# 284145184Sglebius#begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" 285154177Sharti 286154177Sharti# 287154177Sharti# Host resources module 288154177Sharti# This requires the mibII module. 289154177Sharti# 290154177Sharti#begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" 291165419Ssyrinx 292165419Ssyrinx# 293165419Ssyrinx# Bridge module 294165419Ssyrinx# This requires the mibII module. 295165419Ssyrinx# 296165419Ssyrinx#begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so" 297210503Ssyrinx 298210503Ssyrinx# 299210503Ssyrinx# Wireless module 300210503Ssyrinx# This requires the mibII module. 301210503Ssyrinx# 302210503Ssyrinx#begemotSnmpdModulePath."wlan" = "/usr/lib/snmp_wlan.so" 303