Created
June 14, 2018 20:11
-
-
Save csamsel/cf448621fac2da1cfd56726368c21274 to your computer and use it in GitHub Desktop.
activate snmpd on esxi vmhost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set community name, change for maximum security | |
[root@oxygen-vmhost:~] esxcli system snmp set --communities public | |
# activate snmp | |
[root@oxygen-vmhost:~] esxcli system snmp set --enable true | |
# firewall policy defaults to deny | |
[root@oxygen-vmhost:~] esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false | |
# allow specific ip range | |
[root@oxygen-vmhost:~] esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 192.168.2.0/24 | |
# activate firewall rule set | |
[root@oxygen-vmhost:~] esxcli network firewall ruleset set --ruleset-id snmp --enabled true | |
# start service | |
[root@oxygen-vmhost:~] /etc/init.d/snmpd restart | |
root: snmpd Running from interactive shell, running command: esxcli system snmp set -e false. | |
root: snmpd setting up resource reservations. | |
root: snmpd opening firewall port(s) for notifications. | |
root: snmpd watchdog for snmpd started. | |
#done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment