Net-SNMP basic config on Fedora

To setup a basic configuration of Net-SNMP on Fedora you'll need to create a group and give it access to a specific part of the SNMP tree.

# Create an access group based on community/subnet
#com2sec  source          community
com2sec my_access_name default       my_community

# Assign the access to a named group
#group sec.model
group my_group_name any        my_access_name

# Create sub-sections of the tree to give groups access too
#view view_name     incl/excl subtree          mask(optional)
view all    included  .1
# simple_view can view everything in interfaces, system, and ucdavis
view simple_view included  .interfaces
view simple_view    included  .system
view simple_view    included  .ucdavis

# Give your groups access to a specific view
#access context sec.model sec.level prefix read   write  notif
access my_group_name ""      any       noauth    0      simple_view    none   none

Once that is done you should be able to snmpwalk the whole SNMP tree:

snmpwalk -v 2c -c my_community localhost

Or specific parts of the SNMP tree

snmpwalk -v 2c -c my_community localhost system
snmpwalk -v 2c -c my_community localhost interfaces
snmpwalk -v 2c -c my_community localhost ucdavis
Leave A Reply
All content licensed under the Creative Commons License