Skip to content

Commit

Permalink
[snmp]: Bind snmpd to all ip addresses (#1587)
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
  • Loading branch information
qiluo-msft authored and lguohan committed Apr 11, 2018
1 parent 7b36744 commit 6a5afcf
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions dockers/docker-snmp-sv2/snmpd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,9 @@
# AGENT BEHAVIOUR
#

{% if MGMT_INTERFACE %}
# 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
# Listen for connections on all ip addresses, including eth0, ipv4 lo
agentAddress udp:161
{% endif %}
# TODO: only support ipv4 lo addresses, add ipv6 support later

###############################################################################
#
Expand Down

0 comments on commit 6a5afcf

Please sign in to comment.