Code Monkey home page Code Monkey logo

Comments (6)

msiroskey avatar msiroskey commented on June 26, 2024 1

After looking into the code you can disable v1/v2 by passing an empty array to com2sec and com2sec6 parameters.

class { 'snmp':
  com2sec      => [],
  com2sec6     => [],
}

from puppet-snmp.

razorsedge avatar razorsedge commented on June 26, 2024

@hdep I am not positive, but try this:

class { 'snmp':
  ro_community  => undef,
  ro_community6 => undef,
  groups         => [ 'myGroupName v3         mySecName', ],
}

from puppet-snmp.

tarheeljeff avatar tarheeljeff commented on June 26, 2024

Any updated comments on disabling v1/v2 as part of the config? Below are the required steps:

In order to disable the v1 and v2c of SNMP a comment must be added on the com2sec & access lines in the snmpd.conf file, in e.g:

        #com2sec notConfigUser  default       public
        group   notConfigGroup v1           notConfigUser
        group   notConfigGroup v2c           notConfigUser
        view    systemview    included   .1.3.6.1.2.1.1
        view    systemview    included   .1.3.6.1.2.1.25.1.1
        #access  notConfigGroup ""      any       noauth    exact  systemview none none

To disable SNMP v1 connection only, comment out the line of "group notConfigGroup v1 notConfigUser" only. SNMP v2c is still available.

        com2sec notConfigUser  default       public
        #group   notConfigGroup v1           notConfigUser
        group   notConfigGroup v2c           notConfigUser
        view    systemview    included   .1.3.6.1.2.1.1
        view    systemview    included   .1.3.6.1.2.1.25.1.1
        access  notConfigGroup ""      any       noauth    exact  systemview none none

from puppet-snmp.

razorsedge avatar razorsedge commented on June 26, 2024

Looks like a documentation update is in order.

from puppet-snmp.

hdep avatar hdep commented on June 26, 2024

Thank you.
Juste tried that on Debain 9 I got some error :

Aug 9 16:49:39 serversnmpd[12025]: /etc/snmp/snmpd.conf: line 22: Error: Blank line following com2sec token.
Aug 9 16:49:39 server snmpd[12025]: /etc/snmp/snmpd.conf: line 24: Error: Blank line following com2sec6 token.

Maybe it would more efficient to create a variable which enable or disable snmpv2 configuration ?

from puppet-snmp.

hdep avatar hdep commented on June 26, 2024

I did a PR for this :
#128

Any help appreciated to fix the remaining issue, but it is working on my VM.

from puppet-snmp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.