diff options
author | Daniil Baturin <daniil@vyos.io> | 2022-09-16 18:16:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 18:16:42 +0100 |
commit | 748dab43b87c3993bdd5c697e7b778ed7a8e48a1 (patch) | |
tree | d10c394a9a836904a408d507505128afe6e505ab /data/templates/ipsec/swanctl.conf.j2 | |
parent | 79a96ee241760479c7ddec690ed5b28dca89198c (diff) | |
parent | bd4588827b563022ce5fb98b1345b787b9194176 (diff) | |
download | vyos-1x-748dab43b87c3993bdd5c697e7b778ed7a8e48a1.tar.gz vyos-1x-748dab43b87c3993bdd5c697e7b778ed7a8e48a1.zip |
Merge pull request #1463 from sever-sever/T4118
ipsec: T4118: Change vpn ipsec syntax for IKE ESP and peer
Diffstat (limited to 'data/templates/ipsec/swanctl.conf.j2')
-rw-r--r-- | data/templates/ipsec/swanctl.conf.j2 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/data/templates/ipsec/swanctl.conf.j2 b/data/templates/ipsec/swanctl.conf.j2 index bf6b8259c..38d7981c6 100644 --- a/data/templates/ipsec/swanctl.conf.j2 +++ b/data/templates/ipsec/swanctl.conf.j2 @@ -63,9 +63,11 @@ secrets { {% if peer_conf.local_address is vyos_defined %} id-local = {{ peer_conf.local_address }} # dhcp:{{ peer_conf.dhcp_interface if 'dhcp_interface' in peer_conf else 'no' }} {% endif %} - id-remote = {{ peer }} -{% if peer_conf.authentication.id is vyos_defined %} - id-localid = {{ peer_conf.authentication.id }} +{% for address in peer_conf.remote_address %} + id-remote_{{ address | dot_colon_to_dash }} = {{ address }} +{% endfor %} +{% if peer_conf.authentication.local_id is vyos_defined %} + id-localid = {{ peer_conf.authentication.local_id }} {% endif %} {% if peer_conf.authentication.remote_id is vyos_defined %} id-remoteid = {{ peer_conf.authentication.remote_id }} @@ -93,8 +95,8 @@ secrets { {% for ra, ra_conf in remote_access.connection.items() if ra_conf.disable is not vyos_defined %} {% if ra_conf.authentication.server_mode is vyos_defined('pre-shared-secret') %} ike_{{ ra }} { -{% if ra_conf.authentication.id is vyos_defined %} - id = "{{ ra_conf.authentication.id }}" +{% if ra_conf.authentication.local_id is vyos_defined %} + id = "{{ ra_conf.authentication.local_id }}" {% elif ra_conf.local_address is vyos_defined %} id = "{{ ra_conf.local_address }}" {% endif %} |