NAME

WebService::OPNsense::IPsec::Connections - IPsec connection, auth, and child SA controller

VERSION

version 0.001

SYNOPSIS

my $conn = $opn->ipsec_connections;

# Search connections
my $results = $conn->search_connection;

# Add a connection
$conn->add_connection({ ... });

# Toggle a connection
$conn->toggle_connection($uuid, 1);

DESCRIPTION

Manages IPsec connections, local authentication, remote authentication, and child SA configurations.

NAME

WebService::OPNsense::IPsec::Connections - IPsec connection, auth, and child SA controller

METHODS

search_connection

my $results = $conn->search_connection(%params);

Searches for IPsec connections.

get_connection

my $connection = $conn->get_connection($uuid);

Returns a single connection by UUID.

add_connection

my $result = $conn->add_connection($connection_data);

Creates a new IPsec connection.

set_connection

my $result = $conn->set_connection($uuid, $connection_data);

Updates an existing connection.

del_connection

my $result = $conn->del_connection($uuid);

Deletes a connection by UUID.

toggle_connection

my $result = $conn->toggle_connection($uuid, $enabled);

Enables or disables a connection.

search_local

my $results = $conn->search_local(%params);

Searches for local authentication entries.

get_local

my $local = $conn->get_local($uuid);

Returns a single local auth entry by UUID.

add_local

my $result = $conn->add_local($local_data);

Creates a new local authentication entry.

set_local

my $result = $conn->set_local($uuid, $local_data);

Updates an existing local auth entry.

del_local

my $result = $conn->del_local($uuid);

Deletes a local auth entry by UUID.

toggle_local

my $result = $conn->toggle_local($uuid, $enabled);

Enables or disables a local auth entry.

search_remote

my $results = $conn->search_remote(%params);

Searches for remote authentication entries.

get_remote

my $remote = $conn->get_remote($uuid);

Returns a single remote auth entry by UUID.

add_remote

my $result = $conn->add_remote($remote_data);

Creates a new remote authentication entry.

set_remote

my $result = $conn->set_remote($uuid, $remote_data);

Updates an existing remote auth entry.

del_remote

my $result = $conn->del_remote($uuid);

Deletes a remote auth entry by UUID.

toggle_remote

my $result = $conn->toggle_remote($uuid, $enabled);

Enables or disables a remote auth entry.

search_child

my $results = $conn->search_child(%params);

Searches for child SA entries.

get_child

my $child = $conn->get_child($uuid);

Returns a single child SA entry by UUID.

add_child

my $result = $conn->add_child($child_data);

Creates a new child SA entry.

set_child

my $result = $conn->set_child($uuid, $child_data);

Updates an existing child SA entry.

del_child

my $result = $conn->del_child($uuid);

Deletes a child SA entry by UUID.

toggle_child

my $result = $conn->toggle_child($uuid, $enabled);

Enables or disables a child SA entry.

get

my $config = $conn->get;

Returns the global IPsec connections configuration.

set_settings

my $result = $conn->set_settings($settings_data);

Sets the global IPsec connections configuration.

is_enabled

my $enabled = $conn->is_enabled;

Returns whether IPsec is enabled.

swanctl

my $config = $conn->swanctl;

Returns the swanctl configuration.

toggle

my $result = $conn->toggle($enabled);

Enables or disables IPsec globally.

connection_exists

my $exists = $conn->connection_exists($uuid);

Checks whether a connection UUID exists.

AUTHOR

Dean Hamstead <dean@fragfest.com.au>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2026 by Dean Hamstead.

This is free software, licensed under:

The MIT (X11) License