Skip to content

Instantly share code, notes, and snippets.

@d4rkeagle65
Created April 16, 2020 15:04
Show Gist options
  • Save d4rkeagle65/8592d32fbd12f8704e06b2938ea6d3a3 to your computer and use it in GitHub Desktop.
Save d4rkeagle65/8592d32fbd12f8704e06b2938ea6d3a3 to your computer and use it in GitHub Desktop.
Run these commands on an VMWare vSphere host to enable SNMP and restrict it to be accessed for read only by a IP address.
esxcli system snmp set --communities public
esxcli system snmp set --enable true
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false
esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address <IPAddress Of SNMP Manager>
esxcli network firewall ruleset set --ruleset-id snmp --enabled true
/etc/init.d/snmpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment