Claude 1
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<Request>
|
||||
<Login>
|
||||
<Username>{{ sophos_api_username }}</Username>
|
||||
<Password>{{ sophos_api_password }}</Password>
|
||||
</Login>
|
||||
<Set operation="{% if item.name in existing_ipsec_connections | default([]) %}update{% else %}add{% endif %}">
|
||||
<IPSecConnection>
|
||||
<Name>{{ item.name }}</Name>
|
||||
<Description>{{ item.description | default('') }}</Description>
|
||||
<Status>{{ 'Enable' if item.enabled | default(true) else 'Disable' }}</Status>
|
||||
<ConnectionType>{{ item.connection_type | default('tunnel') }}</ConnectionType>
|
||||
|
||||
<!-- Local Settings -->
|
||||
<LocalGateway>{{ item.local_gateway }}</LocalGateway>
|
||||
<LocalID>{{ item.local_id | default(item.local_gateway) }}</LocalID>
|
||||
<LocalNetworks>
|
||||
{% for network in item.local_networks %}
|
||||
<Network>{{ network }}</Network>
|
||||
{% endfor %}
|
||||
</LocalNetworks>
|
||||
|
||||
<!-- Remote Settings -->
|
||||
<RemoteGateway>{{ item.remote_gateway }}</RemoteGateway>
|
||||
<RemoteID>{{ item.remote_id | default(item.remote_gateway) }}</RemoteID>
|
||||
<RemoteNetworks>
|
||||
{% for network in item.remote_networks %}
|
||||
<Network>{{ network }}</Network>
|
||||
{% endfor %}
|
||||
</RemoteNetworks>
|
||||
|
||||
<!-- Phase 1 (IKE) Settings -->
|
||||
<IKEVersion>{{ item.ike_version | default(2) }}</IKEVersion>
|
||||
<IKEEncryption>{{ item.ike_encryption | default(sophos_default_ike_encryption) }}</IKEEncryption>
|
||||
<IKEHash>{{ item.ike_hash | default(sophos_default_ike_hash) }}</IKEHash>
|
||||
<IKEDHGroup>{{ item.ike_dh_group | default(sophos_default_ike_dh_group) }}</IKEDHGroup>
|
||||
<IKELifetime>{{ item.ike_lifetime | default(sophos_default_ike_lifetime) }}</IKELifetime>
|
||||
|
||||
<!-- Authentication -->
|
||||
<AuthenticationMethod>{{ item.authentication_method | default('psk') }}</AuthenticationMethod>
|
||||
{% if item.authentication_method | default('psk') == 'psk' %}
|
||||
<PreSharedKey>{{ item.psk }}</PreSharedKey>
|
||||
{% endif %}
|
||||
|
||||
<!-- Phase 2 (IPsec) Settings -->
|
||||
<IPSecMode>{{ item.ipsec_mode | default('tunnel') }}</IPSecMode>
|
||||
<IPSecEncryption>{{ item.ipsec_encryption | default(sophos_default_ipsec_encryption) }}</IPSecEncryption>
|
||||
<IPSecHash>{{ item.ipsec_hash | default(sophos_default_ipsec_hash) }}</IPSecHash>
|
||||
<IPSecPFSGroup>{{ item.ipsec_pfs_group | default(sophos_default_ipsec_pfs_group) }}</IPSecPFSGroup>
|
||||
<IPSecLifetime>{{ item.ipsec_lifetime | default(sophos_default_ipsec_lifetime) }}</IPSecLifetime>
|
||||
|
||||
<!-- Advanced Settings -->
|
||||
<DPDEnabled>{{ 'Enable' if item.dpd_enabled | default(true) else 'Disable' }}</DPDEnabled>
|
||||
<DPDInterval>{{ item.dpd_interval | default(30) }}</DPDInterval>
|
||||
<DPDRetries>{{ item.dpd_retries | default(3) }}</DPDRetries>
|
||||
<NATTraversal>{{ 'Enable' if item.nat_traversal | default(true) else 'Disable' }}</NATTraversal>
|
||||
</IPSecConnection>
|
||||
</Set>
|
||||
</Request>
|
||||
Reference in New Issue
Block a user