Skip to content

Commit 6a5afcf

Browse files
qiluo-msftlguohan
authored andcommitted
[snmp]: Bind snmpd to all ip addresses (#1587)
Signed-off-by: Qi Luo <[email protected]>
1 parent 7b36744 commit 6a5afcf

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

dockers/docker-snmp-sv2/snmpd.conf.j2

+2-17
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,9 @@
1313
# AGENT BEHAVIOUR
1414
#
1515

16-
{% if MGMT_INTERFACE %}
17-
# Listen for connections on localhost, loopback ip and mgmt (eth0) ip
18-
agentAddress udp:127.0.0.1:161
19-
{% for (name, prefix) in MGMT_INTERFACE %}
20-
{% if prefix | ipv4 %}
21-
agentAddress udp:{{ prefix | ip }}:161
22-
{% endif %}
23-
{% endfor %}
24-
# TODO: only support ipv4 lo addresses, add ipv6 support later
25-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
26-
{% if prefix | ipv4 %}
27-
agentAddress udp:{{ prefix | ip }}:161
28-
{% endif %}
29-
{% endfor %}
30-
{% else %}
31-
# Listen on all addresses as mgmt ip not specified
16+
# Listen for connections on all ip addresses, including eth0, ipv4 lo
3217
agentAddress udp:161
33-
{% endif %}
18+
# TODO: only support ipv4 lo addresses, add ipv6 support later
3419

3520
###############################################################################
3621
#

0 commit comments

Comments
 (0)