File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,19 @@ filegen clockstats file clockstats type day enable
27
27
server {{ ntp_server }} iburst
28
28
{% endfor %}
29
29
30
- #only listen on localhost and eth0 ips (default is to listen on all ip addresses)
30
+ #only listen on MGMT_INTERFACE, LOOPBACK_INTERFACE ip when MGMT_INTERFACE is not defined, or eth0
31
+ # if we don't have both of them (default is to listen on all ip addresses)
31
32
interface ignore wildcard
32
33
{% if MGMT_INTERFACE %}
33
34
{% for (mgmt_intf , mgmt_prefix ) in MGMT_INTERFACE %}
34
35
interface listen {{ mgmt_prefix | ip }}
35
36
{% endfor %}
37
+ {% elif LOOPBACK_INTERFACE %}
38
+ {% for (name , prefix ) in LOOPBACK_INTERFACE |pfx_filter %}
39
+ {% if prefix | ipv 4 and name == 'Loopback0' %}
40
+ interface listen {{ prefix | ip }}
41
+ {% endif %}
42
+ {% endfor %}
36
43
{% else %}
37
44
interface listen eth0
38
45
{% endif %}
You can’t perform that action at this time.
0 commit comments