summaryrefslogtreecommitdiff
path: root/snmpd/snmpd.config
diff options
context:
space:
mode:
Diffstat (limited to 'snmpd/snmpd.config')
-rw-r--r--snmpd/snmpd.config119
1 files changed, 99 insertions, 20 deletions
diff --git a/snmpd/snmpd.config b/snmpd/snmpd.config
index f9f88410837c..dd39c385b3a9 100644
--- a/snmpd/snmpd.config
+++ b/snmpd/snmpd.config
@@ -28,7 +28,7 @@
#
# $Begemot: bsnmp/snmpd/snmpd.config,v 1.16 2006/02/14 09:04:20 brandt_h Exp $
#
-# Example configuration file.
+# Example configuration file for testing.
#
#
@@ -38,46 +38,80 @@ host := foo.bar.com
location := "Room 200"
contact := "sysmeister@bar.com"
system := 1 # FreeBSD
-traphost := noc.bar.com
+traphost := localhost
trapport := 162
read := "public"
-# Uncomment the line below that sets the community string
-# to enable write access.
-write := "geheim"
+write := "geheim" # take care - this allows writing
trap := "mytrap"
+securityModelSNMPv1 := 1
+securityModelSNMPv2c := 2
+
+noAuthNoPriv := 1
+
#
# Configuration
#
%snmpd
begemotSnmpdDebugDumpPdus = 2
begemotSnmpdDebugSyslogPri = 7
+begemotSnmpdDebugSnmpTrace = 0
#
-# Set the read and write communities.
+# Set community strings.
#
-# The default value of the community strings is NULL (note, that this is
-# different from the empty string). This disables both read and write access.
-# To enable read access only the read community string must be set. Setting
-# the write community string enables both read and write access with that
-# string.
+# Each community string has a permission attached to it - 1 for read only
+# and 2 for read/write. Default is 1. Community strings must be unique.
#
# Be sure to understand the security implications of SNMPv2 - the community
# strings are readable on the wire!
#
begemotSnmpdCommunityString.0.1 = $(read)
-# begemotSnmpdCommunityString.0.2 = $(write)
-# begemotSnmpdCommunityString.0.3 = "otherPublic"
+begemotSnmpdCommunityPermission.0.1 = 1
+#begemotSnmpdCommunityString.0.2 = $(write)
+#begemotSnmpdCommunityPermission.0.2 = 2
+#begemotSnmpdCommunityString.0.3 = "otherPublic"
begemotSnmpdCommunityDisable = 1
# open standard SNMP ports
-begemotSnmpdPortStatus.[$(host)].161 = 1
-begemotSnmpdPortStatus.127.0.0.1.161 = 1
+# 0.0.0.0:161
+begemotSnmpdTransInetStatus.1.4.0.0.0.0.161.1 = 4
+
+# test the port table; IPv4 address
+# 127.0.0.1:10161
+begemotSnmpdTransInetStatus.1.4.127.0.0.1.10161.1 = 4
+
+# test the port table; IPv6 address
+# ::1:10162
+begemotSnmpdTransInetStatus.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.10162.1 = 4
+# :::10163
+begemotSnmpdTransInetStatus.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.10163.1 = 4
+# fe80::1%1:10164 - requires inet fe80::1%em0/64
+begemotSnmpdTransInetStatus.4.20.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.1.10164.1 = 4
+# fe80::1%2:10164 - requires inet fe80::1%em1/64
+begemotSnmpdTransInetStatus.4.20.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.2.10164.1 = 4
+# fe80::1:10170 - should fail (no scope index)
+# begemotSnmpdTransInetStatus.2.16.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.10170.1 = 4
+# fe80::1%0:10170 - should fail (default scope index for link local address)
+# begemotSnmpdTransInetStatus.4.20.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.0.10170.1 = 4
+
+# test the port table; DNS address
+# :10165 UDPv4 and UDPv6
+begemotSnmpdTransInetStatus.16.0.10165.1 = 4
+# 127.0.0.1:10166
+# ::1:10166
+begemotSnmpdTransInetStatus.16."localhost".10166.1 = 4
+# ::1:10167
+begemotSnmpdTransInetStatus.16."localhost6".10167.1 = 4
+# fe80::1%em0:10168 - requires inet fe80::$em0/64
+begemotSnmpdTransInetStatus.16."fe80::1%em0".10168.1 = 4
+# fe80::1%em1:10169 - requires inet fe80::$em1/64
+begemotSnmpdTransInetStatus.16."fe80::1%em1".10169.1 = 4
# open a unix domain socket
-begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
-begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
+# begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
+# begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
# send traps to the traphost
begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
@@ -93,12 +127,57 @@ snmpEnableAuthenTraps = 2
#
# Load MIB-2 module
#
+#begemotSnmpdModulePath."mibII" = "../snmp_mibII/.libs/snmp_mibII.so"
begemotSnmpdModulePath."mibII" = "/usr/local/lib/snmp_mibII.so"
#
+# SNMPv3 notification targets
+#
+#begemotSnmpdModulePath."target" = "../snmp_target/.libs/snmp_target.so"
+begemotSnmpdModulePath."target" = "/usr/local/lib/snmp_target.so"
+
+#
+# SNMPv3 user-based security module
+#
+#begemotSnmpdModulePath."usm" = "../snmp_usm/.libs/snmp_usm.so"
+begemotSnmpdModulePath."usm" = "/usr/local/lib/snmp_usm.so"
+
+#
+# SNMPv3 view-based access control module
+#
+#begemotSnmpdModulePath."vacm" = "../snmp_vacm/.libs/snmp_vacm.so"
+begemotSnmpdModulePath."vacm" = "/usr/local/lib/snmp_vacm.so"
+
+#
# Netgraph module
#
-begemotSnmpdModulePath."netgraph" = "/usr/local/lib/snmp_netgraph.so"
+# begemotSnmpdModulePath."netgraph" = "/usr/local/lib/snmp_netgraph.so"
+# %netgraph
+# begemotNgControlNodeName = "snmpd"
+
+%vacm
+
+internetoid := 1.3.6.1
+internetoidlen := 4
+
+vacmSecurityToGroupStatus.$(securityModelSNMPv1).$(read) = 4
+vacmGroupName.$(securityModelSNMPv1).$(read) = $(read)
+
+vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(read) = 4
+vacmGroupName.$(securityModelSNMPv2c).$(read) = $(read)
+
+vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(write) = 4
+vacmGroupName.$(securityModelSNMPv2c).$(write) = $(write)
+
+vacmViewTreeFamilyStatus."internet".$(internetoidlen).$(internetoid) = 4
+
+vacmAccessStatus.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = 4
+vacmAccessReadViewName.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = "internet"
+
+vacmAccessStatus.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4
+vacmAccessStatus.$(read)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4
+vacmAccessReadViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet"
+vacmAccessReadViewName.$(read)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet"
+vacmAccessWriteViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet"
+vacmAccessWriteViewName.$(read)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet"
-%netgraph
-begemotNgControlNodeName = "snmpd"