NAME
WebService::OPNsense::Constants - Cross-cutting constants for the OPNsense REST API
VERSION
version 0.001
SYNOPSIS
use WebService::OPNsense::Constants;
# All constants are exported by default
print $ACTION_PASS;
print $PROTO_TCP;
print $INTERFACE_WAN;
DESCRIPTION
Provides shared constant values used across the OPNsense API. Constants cover actions, protocols, interfaces, directions, state types, and other enum-like values that appear in multiple API controllers.
Constants are exported automatically on use. No explicit import list is needed.
NAME
WebService::OPNsense::Constants - Cross-cutting constants for the OPNsense REST API
CONSTANTS
Actions
Address families
Alias types
$ALIAS_ASN- BGP ASN$ALIAS_AUTHGROUP- OpenVPN group$ALIAS_DYNIPV6HOST- Dynamic IPv6 Host$ALIAS_EXTERNAL- External (advanced)$ALIAS_GEOIP- GeoIP$ALIAS_HOST- Host(s)$ALIAS_INTERNAL- Internal (automatic)$ALIAS_MAC- MAC address$ALIAS_NETWORK- Network(s)$ALIAS_NETWORK_GROUP- Network group$ALIAS_PORT- Port(s)$ALIAS_URL- URL (IPs)$ALIAS_URL_JSON- URL Table in JSON format (IPs)$ALIAS_URL_TABLE- URL Table (IPs)
Directions
Enabled / Disabled
Gateway
Interfaces
$INTERFACE_DMZ$INTERFACE_GUEST$INTERFACE_LAN$INTERFACE_LOOPBACK$INTERFACE_OPT1through$INTERFACE_OPT9$INTERFACE_WAN$INTERFACE_WAN2$INTERFACE_WAN_DHCP$INTERFACE_WAN_PPPOE
Interface groups
Log levels
One-to-one NAT types
Protocols
$PROTO_ANY$PROTO_ESP$PROTO_GRE$PROTO_ICMP$PROTO_OSPF$PROTO_PIM$PROTO_SCTP$PROTO_TCP$PROTO_TCP_UDP$PROTO_UDP$PROTO_VRRP
Rule sequence positions
SNAT modes
State types
TCP flags
$TCP_FLAG_ACK$TCP_FLAG_CWR$TCP_FLAG_ECE$TCP_FLAG_FIN$TCP_FLAG_PSH$TCP_FLAG_RST$TCP_FLAG_SYN$TCP_FLAG_URG
TLS versions
SEE ALSO
WebService::OPNsense - main client class
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