xref: /freebsd/usr.sbin/bsnmpd/bsnmpd/snmpd.config (revision 06c3fb27)
1#
2# Example configuration file for bsnmpd(1).
3#
4
5#
6# Set some common variables
7#
8location := "Room 200"
9contact := "sysmeister@example.com"
10system := 1	# FreeBSD
11traphost := localhost
12trapport := 162
13
14#
15# Set the SNMP engine ID.
16#
17# The snmpEngineID object required from the SNMPv3 Framework. If not explicitly set via
18# this configuration file, an ID is assigned based on the value of the
19# kern.hostid variable
20# engine := 0x80:0x10:0x08:0x10:0x80:0x25
21# snmpEngineID = $(engine)
22
23# Change this!
24read := "public"
25# Uncomment begemotSnmpdCommunityString.0.2 below that sets the community
26# string to enable write access.
27write := "geheim"
28trap := "mytrap"
29
30#
31# Declarations for SNMP-USER-BASED-SM-MIB authentication and privacy options
32#
33
34NoAuthProtocol		:= 1.3.6.1.6.3.10.1.1.1
35HMACMD5AuthProtocol	:= 1.3.6.1.6.3.10.1.1.2
36HMACSHAAuthProtocol	:= 1.3.6.1.6.3.10.1.1.3
37NoPrivProtocol		:= 1.3.6.1.6.3.10.1.2.1
38DESPrivProtocol		:= 1.3.6.1.6.3.10.1.2.2
39AesCfb128Protocol	:= 1.3.6.1.6.3.10.1.2.4
40
41#
42# Enumerations from SNMP-FRAMEWORK-MIB
43#
44
45# Security models
46securityModelAny	:= 0
47securityModelSNMPv1	:= 1
48securityModelSNMPv2c	:= 2
49securityModelUSM	:= 3
50
51# Message Processing models
52MPmodelSNMPv1		:= 0
53MPmodelSNMPv2c		:= 1
54MPmodelSNMPv3		:= 3
55
56# Security levels
57noAuthNoPriv := 1
58authNoPriv := 2
59authPriv := 3
60
61
62# SNMPv3 USM User definition
63#
64# The localized hex password for a user may be obtained by setting SNMPUSER, SNMPPASSWD,
65# SNMPAUTH and SNMPPRIV environment variables to the desired parameters and invoking
66# 'bsnmpget -v 3 -D -K -o verbose' against the running bsnmpd(1). For other
67# usages refer to the bsnmpget(1) manual page. The following lines define a user "bsnmp"
68# with a private password "bsnmptest", localized for the above engine ID.
69#
70#user1 := "bsnmp"
71#user1passwd := 0x22:0x98:0x1a:0x6e:0x39:0x93:0x16:0x5e:0x6a:0x21:0x1b:0xd8:0xa9:0x81:0x31:0x05:0x16:0x33:0x38:0x60
72
73#
74# Configuration
75#
76%snmpd
77begemotSnmpdDebugDumpPdus	= 2
78begemotSnmpdDebugSyslogPri	= 7
79
80#
81# Set the read and write communities.
82#
83# The default value of the community strings is NULL (note, that this is
84# different from the empty string). This disables both read and write access.
85# To enable read access only the read community string must be set. Setting
86# the write community string enables both read and write access with that
87# string.
88#
89# Be sure to understand the security implications of SNMPv2 - the community
90# strings are readable on the wire!
91#
92begemotSnmpdCommunityString.0.1	= $(read)
93# begemotSnmpdCommunityString.0.2	= $(write)
94# begemotSnmpdCommunityString.0.3	= "otherPublic"
95begemotSnmpdCommunityDisable	= 1
96
97# open standard SNMP ports
98begemotSnmpdTransInetStatus.1.4.0.0.0.0.161.1 = 4
99begemotSnmpdTransInetStatus.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.161.1 = 4
100
101# UDP over IPv4: 127.0.0.1:161
102# begemotSnmpdTransInetStatus.1.4.127.0.0.1.161.1 = 4
103
104# UDP over IPv6: ::1:161
105# begemotSnmpdTransInetStatus.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.161.1 = 4
106
107# Use domain name and IPv6 link-local address with scope zone id as address
108# begemotSnmpdTransInetStatus.16."localhost".161.1 = 4
109# begemotSnmpdTransInetStatus.16."fe80::1%em0".161.1 = 4
110
111# open a unix domain socket
112begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
113begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
114
115# send traps to the traphost
116begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
117begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
118begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)
119
120sysContact	= $(contact)
121sysLocation	= $(location)
122sysObjectId 	= 1.3.6.1.4.1.12325.1.1.2.1.$(system)
123
124snmpEnableAuthenTraps = 2
125
126# Uncomment `begemotSnmpdModulePath.".." = ".."' entries below to enable
127# modules
128
129#
130# Control configuration for the modules in the module specific sections, e.g.
131# the "usm" module (begemotSnmpdModulePath."usm") can be controlled in the
132# %usm specific section. You must uncomment the section specific header in
133# order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)`
134# can only be used if %usm is uncommented.
135#
136# Modules are loaded in the order listed, so they must be before any
137# dependent modules, e.g. "mibII" vs "bridge".
138#
139
140#
141# MIB-2 module
142#
143begemotSnmpdModulePath."mibII"	= "/usr/lib/snmp_mibII.so"
144
145#
146# Bridge module
147#  This requires the mibII module.
148#
149#begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so"
150
151#
152# Host resources module
153#  This requires the mibII module.
154#
155#begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
156
157#
158# LM75 Sensor module
159#
160#begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so"
161
162#
163# Netgraph module
164#
165#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"
166
167#
168# pf(4) module
169#
170#begemotSnmpdModulePath."pf"	= "/usr/lib/snmp_pf.so"
171
172#
173# SNMPv3 Notification Targets
174#
175# begemotSnmpdModulePath."target"	= "/usr/lib/snmp_target.so"
176
177#
178# SNMPv3 User-based security module - must be loaded for SNMPv3 USM
179#
180#begemotSnmpdModulePath."usm"	= "/usr/lib/snmp_usm.so"
181
182#
183# SNMPv3 View-based Access Control module
184#
185#begemotSnmpdModulePath."vacm"	= "/usr/lib/snmp_vacm.so"
186
187#
188# Wireless module
189#  This requires the mibII module.
190#
191#begemotSnmpdModulePath."wlan" = "/usr/lib/snmp_wlan.so"
192
193#
194# SNMPv3 USM User definition.
195#
196
197#%usm
198
199#
200# The following block creates a user with name "bsnmp" and sets privacy
201# and encryption options to SHA256 message digests and AES encryption
202# for this user.
203#
204# usmUserStatus.$(engine).$(user1) = 5
205# usmUserAuthProtocol.$(engine).$(user1) = $(HMACSHAAuthProtocol)
206# usmUserAuthKeyChange.$(engine).$(user1) = $(user1passwd)
207# usmUserPrivProtocol.$(engine).$(user1) = $(AesCfb128Protocol)
208# usmUserPrivKeyChange.$(engine).$(user1) = $(user1passwd)
209# usmUserStatus.$(engine).$(user1) = 1
210#
211
212#
213# The following block creates a user with name "public" with no authentication
214# or encryption options.
215#
216# usmUserStatus.$(engine).$(read) = 5
217# usmUserAuthProtocol.$(engine).$(read) = $(NoAuthProtocol)
218# usmUserPrivProtocol.$(engine).$(read) = $(NoPrivProtocol)
219# usmUserStatus.$(engine).$(read) = 1
220#
221
222#
223# Definition of view-based access control entries.
224#
225#%vacm
226
227# Definition of a SNMPv1 group
228# vacmSecurityToGroupStatus.$(securityModelSNMPv1).$(read) = 4
229# vacmGroupName.$(securityModelSNMPv1).$(read) = $(read)
230
231# Definition of SNMPv2 group
232# vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(write) = 4
233# vacmGroupName.$(securityModelSNMPv2c).$(write) = $(write)
234
235# Definition of SNMPv3 group with users "bsnmp" and "public"
236# vacmSecurityToGroupStatus.$(securityModelUSM).$(user1) = 4
237# vacmGroupName.$(securityModelUSM).$(user1) = $(write)
238# vacmSecurityToGroupStatus.$(securityModelUSM).$(read) = 4
239# vacmGroupName.$(securityModelUSM).$(read) = $(write)
240
241#
242# The OID of the .iso.org.dod.internet subtree
243#
244# internetoid := 1.3.6.1
245# internetoidlen := 4
246
247#
248# Definitions of two views
249#
250# vacmViewTreeFamilyStatus."internet".$(internetoidlen).$(internetoid) = 4
251# vacmViewTreeFamilyStatus."restricted".$(internetoidlen).$(internetoid) = 4
252
253#
254# Access control
255#
256
257#
258# Read-only access for SNMPv1 users
259#
260# vacmAccessStatus.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = 4
261# vacmAccessReadViewName.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = "internet"
262
263#
264# Read-write access for SNMPv2 users
265#
266# vacmAccessStatus.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4
267# vacmAccessReadViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet"
268# vacmAccessWriteViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet"
269
270#
271# Read-write-notify access for SNMPv3 USM users with noAuthNoPriv
272#
273# vacmAccessStatus.$(write)."".3.$(noAuthNoPriv) = 4
274# vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet"
275# vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet"
276# vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet"
277
278#
279#Read-write-notify access to restricted for SNMPv3 USM users with authPriv
280#
281# vacmAccessStatus.$(write)."".$(securityModelUSM).$(authPriv) = 4
282# vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted"
283# vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted"
284# vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted"
285
286#%target
287# Send notifications to target tag "test"
288# tag		:= "test"
289# snmpNotifyRowStatus.$(tag) = 4
290# snmpNotifyTag.$(tag) = $(tag)
291
292# tagremote		:= "testremote"
293# snmpNotifyRowStatus.$(tagremote) = 4
294# snmpNotifyTag.$(tagremote) = $(tagremote)
295
296#
297# Specify the target parameters for the notifications - send with the credentials
298# of user "bsnmp"
299#
300# snmpTargetParamsRowStatus.$(tag) = 5
301# snmpTargetParamsMPModel.$(tag) = $(MPmodelSNMPv3)
302# snmpTargetParamsSecurityModel.$(tag) = $(securityModelUSM)
303# snmpTargetParamsSecurityName.$(tag) = $(user1)
304# snmpTargetParamsSecurityLevel.$(tag) = $(authPriv)
305# snmpTargetParamsRowStatus.$(tag) = 1
306
307#
308# Define the notifications' target address - port 162 on localhost
309#
310# snmpTargetAddrRowStatus.$(tag) = 5
311# snmpTargetAddrTAddress.$(tag) = 0x7f:0x0:0x0:0x1:0x0:0xa2
312# snmpTargetAddrTagList.$(tag) = "test notification"
313# snmpTargetAddrParams.$(tag) = $(tag)
314# snmpTargetAddrRowStatus.$(tag) = 1
315
316#
317# Define the notifications' target address - port 162 on 10.0.0.1
318#
319# snmpTargetAddrRowStatus.$(tagremote) = 5
320# snmpTargetAddrTAddress.$(tagremote) = 0x0a:0x00:0x00:0x1:0x0:0xa2
321# snmpTargetAddrTagList.$(tagremote) = $(tagremote)
322# snmpTargetAddrParams.$(tagremote) = $(tag)
323# snmpTargetAddrRowStatus.$(tagremote) = 1
324
325# Force a polling rate for the 64-bit interface counters in case
326# the automatic computation is wrong (which may be the case if an interface
327# announces the wrong bit rate via its MIB).
328#%mibII
329#begemotIfForcePoll = 2000
330
331#%netgraph
332#begemotNgControlNodeName = "snmpd"
333
334