blob: a73f25a85255a7d087a0707f92d4dcbf008a165c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
########################################################
#
# autogenerated by nat66.py
#
# The configuration file must define one upstream
# interface.
#
# For some services, such as nat66, because it runs
# stateless, it needs to rely on NDP Proxy to respond
# to NDP requests.
#
# When using nat66 source rules, NDP Proxy needs
# to be enabled
#
########################################################
{% set global = namespace(ndppd_interfaces = [],ndppd_prefixs = []) %}
{% if source is defined and source.rule is defined and source.rule is not none %}
{% for rule, config in source.rule.items() if config.disable is not defined %}
{% if config.outbound_interface is defined %}
{% if config.outbound_interface not in global.ndppd_interfaces %}
{% set global.ndppd_interfaces = global.ndppd_interfaces + [config.outbound_interface] %}
{% endif %}
{% if config.translation.prefix is defined %}
{% set global.ndppd_prefixs = global.ndppd_prefixs + [{'interface':config.outbound_interface,'rule':config.translation.prefix}] %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% if destination is defined and destination.rule is defined and destination.rule is not none %}
{% for rule, config in destination.rule.items() if config.disable is not defined %}
{% if config.inbound_interface is defined %}
{% if config.inbound_interface not in global.ndppd_interfaces %}
{% set global.ndppd_interfaces = global.ndppd_interfaces + [config.inbound_interface] %}
{% endif %}
{% if config.translation.address is defined %}
{% set global.ndppd_prefixs = global.ndppd_prefixs + [{'interface':config.inbound_interface,'rule':config.translation.address}] %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% for i in global.ndppd_interfaces %}
proxy {{ i }} {
router yes
timeout 500
ttl 30000
{% for map in global.ndppd_prefixs %}
{% if map['interface'] == i %}
{% set p = map['rule'] %}
rule {{ p }} {
static
}
{% endif %}
{% endfor %}
}
{% endfor %}
|