diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-24 09:44:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-24 09:44:24 +0100 |
commit | 1afd7568adb6e5c8823a533c4c20892177584959 (patch) | |
tree | 76abbc073fb8b3381b41f5598aa70cb30a66dfe9 /data/templates/proxy-ndp/ndppd.conf.tmpl | |
parent | 6baf79a72cac9e6624d56b140511c32fad2cfbaa (diff) | |
parent | e5388766529756a0d1ec58f0ecfad456ce28c96c (diff) | |
download | vyos-1x-1afd7568adb6e5c8823a533c4c20892177584959.tar.gz vyos-1x-1afd7568adb6e5c8823a533c4c20892177584959.zip |
Merge pull request #520 from jack9603301/nptv6
nptv6: T2518: Initial support for nat66 (NPT)
Diffstat (limited to 'data/templates/proxy-ndp/ndppd.conf.tmpl')
-rw-r--r-- | data/templates/proxy-ndp/ndppd.conf.tmpl | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/data/templates/proxy-ndp/ndppd.conf.tmpl b/data/templates/proxy-ndp/ndppd.conf.tmpl new file mode 100644 index 000000000..0137d8135 --- /dev/null +++ b/data/templates/proxy-ndp/ndppd.conf.tmpl @@ -0,0 +1,44 @@ +######################################################## +# +# 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 %} + +{% for interface in global.ndppd_interfaces %} +proxy {{ interface }} { + router yes + timeout 500 + ttl 30000 +{% for map in global.ndppd_prefixs %} +{% if map.interface == interface %} + rule {{ map.rule }} { + static + } +{% endif %} +{% endfor %} +} +{% endfor %} |