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