NAME

WebService::OPNsense::Interfaces - Interfaces API controller

VERSION

version 0.002

SYNOPSIS

use WebService::OPNsense::Constants qw( $INTERFACE_LAN );

my $if = $opn->interfaces;

my $info = $if->overview;
my $eth0 = $if->get_interface($INTERFACE_LAN);

DESCRIPTION

Network interface management.

METHODS

overview

my $info = $if->overview;

Returns overview information for all network interfaces.

get_interface

my $interface = $if->get_interface($if);

Returns detailed information for a specific interface by name or ID.

export

my $data = $if->export;

Exports interface configuration.

reload_interface

my $result = $if->reload_interface;
my $result = $if->reload_interface($identifier);

Reloads a network interface. Optionally specify the interface identifier.

settings_get

my $settings = $if->settings_get;

Returns interface settings.

settings_set

my $result = $if->settings_set($settings_data);

Updates interface settings.

settings_reconfigure

my $result = $if->settings_reconfigure;

Applies pending interface settings changes.

CONSTANTS

Interface name constants are available from WebService::OPNsense::Constants:

$INTERFACE_LAN
$INTERFACE_WAN
$INTERFACE_DMZ
$INTERFACE_GUEST
$INTERFACE_LOOPBACK
$INTERFACE_OPT1 through $INTERFACE_OPT9

Use them when calling get_interface or reload_interface.

client

my $http_client = $interfaces->client;

Returns the underlying HTTP client object used for API requests.

SEE ALSO

WebService::OPNsense

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