Comments (6)
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.
@hdep I am not positive, but try this:
class { 'snmp':
ro_community => undef,
ro_community6 => undef,
groups => [ 'myGroupName v3 mySecName', ],
}
from puppet-snmp.
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.
Looks like a documentation update is in order.
from puppet-snmp.
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.
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)
- # Other Configuration HOT 2
- To support CentOS 8 HOT 1
- rw and ro community strings wrong and default breaks rhel7 if ipv6 off
- $facts['networking']['fqdn'] is too recent HOT 3
- Dependency on stdlib versions incorrect for version 5.1.0 ; types/ip/address/v6/cidr.pp and type Stdlib::IP::Address::V6::CIDR does not exist in 4.25.0
- Docs: Incorrect dependency (stdlib) listed on forge.puppet.com page HOT 2
- Doesn't work on ubuntu focal 20.04 HOT 1
- Cannot disable traditional access control for ro_community{,6}
- FreeBSD Support
- Support Debian Bullseye 11 (to be released in may or june) HOT 4
- systemd daemon-reload restarts snmpd HOT 15
- snmpd starts on each puppet run HOT 1
- Incorrect type of agentx_perms parameter
- Release new version HOT 4
- How to disable snmpv1 and v2 HOT 1
- Support for Ubuntu 22.04 HOT 6
- Reload snmpd config instead of restarting service by default
- $snmpv2_enable parameter does not disable snmpv2.
- snmpd_options and/or snmptrapd_options are ignored on Ubuntu and Debian due to lack of systemd support
- Removing a non-empty directory $var_net_snmp
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-snmp.