virtualization:vmware:67:snmp_ena
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| virtualization:vmware:67:snmp_ena [2019/10/04 06:35] – created rplecko | virtualization:vmware:67:snmp_ena [2019/10/04 07:11] (current) – rplecko | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | === Enable | + | === Configure |
| + | Login into VMware host using SSH and root credentials, | ||
| - | esxcli system snmp set --communities | + | esxcli system snmp set --communities |
| esxcli system snmp set --enable true | esxcli system snmp set --enable true | ||
| - | | + | |
| + | Replace YOUR_COMMUNITY_STRING with the Community string you are going to use, usually this is Private or Public but I think you need to use some unique string one for security reasons. | ||
| + | Enable SNMP on ESXi firewall | ||
| + | |||
| + | Now we need to add a firewall rule to allow inbound SNMP traffic to our ESXi host. For this, we have two options: | ||
| + | |||
| + | 1.Allow all traffic for SNMP \\ | ||
| + | 2.Allow traffic from specific hosts or subnets | ||
| + | |||
| + | === Allow traffic from All hosts === | ||
| esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true | esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true | ||
| esxcli network firewall ruleset set --ruleset-id snmp --enabled true | esxcli network firewall ruleset set --ruleset-id snmp --enabled true | ||
| + | |||
| + | === Allow traffic from specific hosts or subnets === | ||
| + | |||
| + | esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false | ||
| + | esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 192.168.1.0/ | ||
| + | esxcli network firewall ruleset set --ruleset-id snmp --enabled true | ||
| + | |||
| + | === Restart SNMP Service === | ||
| + | |||
| + | Now that we have done our VMware 6.5 SNMP configuration we need to restart the SNMP service | ||
| + | |||
| + | / | ||
| + | |||
| + | |||
| + | 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 10.0.2.0/24 | ||
| + | esxcli network firewall ruleset set --ruleset-id snmp --enabled true | ||
| + | / | ||
virtualization/vmware/67/snmp_ena.1570170952.txt.gz · Last modified: 2019/10/04 06:35 by rplecko
