summaryrefslogtreecommitdiff
path: root/data/templates/ipsec/swanctl/peer.j2
diff options
context:
space:
mode:
authorLucas Christian <lucas@lucasec.com>2024-07-20 19:29:14 -0700
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-07-22 10:28:04 +0000
commit4d82c1862172bea03c9be7482b8ed3bbddf5b395 (patch)
tree3150f07f31916a7b7cced1af50440b086b962631 /data/templates/ipsec/swanctl/peer.j2
parent5ae173c05defa1e230552271018133816ca00467 (diff)
downloadvyos-1x-4d82c1862172bea03c9be7482b8ed3bbddf5b395.tar.gz
vyos-1x-4d82c1862172bea03c9be7482b8ed3bbddf5b395.zip
T6599: ipsec: support disabling rekey of CHILD_SA.
Also adds support for life_bytes, life_packets, and DPD for remote-access connections. Changes behavior of remote-access esp-group lifetime setting to have parity with site-to-site connections. (cherry picked from commit fd5d7ff0b4fd69b248ecb29c6ec1f3cf844c41cf)
Diffstat (limited to 'data/templates/ipsec/swanctl/peer.j2')
-rw-r--r--data/templates/ipsec/swanctl/peer.j210
1 files changed, 10 insertions, 0 deletions
diff --git a/data/templates/ipsec/swanctl/peer.j2 b/data/templates/ipsec/swanctl/peer.j2
index 58f0199fa..3a9af2c94 100644
--- a/data/templates/ipsec/swanctl/peer.j2
+++ b/data/templates/ipsec/swanctl/peer.j2
@@ -63,6 +63,11 @@
life_packets = {{ vti_esp.life_packets }}
{% endif %}
life_time = {{ vti_esp.lifetime }}s
+{% if vti_esp.disable_rekey is vyos_defined %}
+ rekey_bytes = 0
+ rekey_packets = 0
+ rekey_time = 0s
+{% endif %}
local_ts = 0.0.0.0/0,::/0
remote_ts = 0.0.0.0/0,::/0
updown = "/etc/ipsec.d/vti-up-down {{ peer_conf.vti.bind }}"
@@ -108,6 +113,11 @@
life_packets = {{ tunnel_esp.life_packets }}
{% endif %}
life_time = {{ tunnel_esp.lifetime }}s
+{% if tunnel_esp.disable_rekey is vyos_defined %}
+ rekey_bytes = 0
+ rekey_packets = 0
+ rekey_time = 0s
+{% endif %}
{% if tunnel_esp.mode is not defined or tunnel_esp.mode == 'tunnel' %}
{% if tunnel_conf.local.prefix is vyos_defined %}
{% set local_prefix = tunnel_conf.local.prefix if 'any' not in tunnel_conf.local.prefix else ['0.0.0.0/0', '::/0'] %}