[snmp]: Bind snmpd to all ip addresses (#1587)
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
This commit is contained in:
parent
27e57c06ab
commit
ccff73bb33
@ -13,24 +13,9 @@
|
|||||||
# AGENT BEHAVIOUR
|
# AGENT BEHAVIOUR
|
||||||
#
|
#
|
||||||
|
|
||||||
{% if MGMT_INTERFACE %}
|
# Listen for connections on all ip addresses, including eth0, ipv4 lo
|
||||||
# Listen for connections on localhost, loopback ip and mgmt (eth0) ip
|
|
||||||
agentAddress udp:127.0.0.1:161
|
|
||||||
{% for (name, prefix) in MGMT_INTERFACE %}
|
|
||||||
{% if prefix | ipv4 %}
|
|
||||||
agentAddress udp:{{ prefix | ip }}:161
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
# TODO: only support ipv4 lo addresses, add ipv6 support later
|
|
||||||
{% for (name, prefix) in LOOPBACK_INTERFACE %}
|
|
||||||
{% if prefix | ipv4 %}
|
|
||||||
agentAddress udp:{{ prefix | ip }}:161
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
# Listen on all addresses as mgmt ip not specified
|
|
||||||
agentAddress udp:161
|
agentAddress udp:161
|
||||||
{% endif %}
|
# TODO: only support ipv4 lo addresses, add ipv6 support later
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user