Skip to main content

OPNSense

This Integration is part of the OPNSense Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.0.0 and later.

Manage OPNsense Firewall. For more information see OPNsense documentation. OPNsense is an open source, easy-to-use and easy-to-build HardenedBSD based firewall and routing platform. This integration was integrated and tested with version 22.1 of OPNSense

Configure OPNSense in Cortex#

ParameterRequired
Server URL (e.g. https://opnsense.mydomain.ltd)True
API KeyTrue
API SecretTrue
Trust any certificate (not secure)False
Use system proxy settingsFalse

Commands#

You can execute these commands from the CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

opnsense-alias-list#


Get aliases list

Base Command#

opnsense-alias-list

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.AliasunknownAliases list

opnsense-alias-add#


Create new alias

Base Command#

opnsense-alias-add

Input#

Argument NameDescriptionRequired
nameAlias name.Required
typeAlias type. Possible values are: host, network, port, url, urltable, geoip, networkgroup, mac, external, dynipv6host.Required
enabledAlias enabled. Possible values are: 1, 0. Default is 1.Optional
protoAlias protocol. Possible values are: inet, inet6.Optional
updatefreqAlias update frequency.Optional
countersAlias statistics. Possible values are: 0, 1.Optional
descriptionAlias description.Optional
contentAlias content.Optional
auto_commitApply automaticly aliases changes. Possible values are: False, True. Default is False.Optional

Context Output#

PathTypeDescription
OPNSense.AliasunknownAlias UUID created

opnsense-alias-del#


Delete alias with uuid

Base Command#

opnsense-alias-del

Input#

Argument NameDescriptionRequired
uuidAlias UUID.Required
auto_commitApply automaticly aliases changes. Possible values are: False, True. Default is False.Optional

Context Output#

PathTypeDescription
OPNSense.AliasunknownAlias UUID deleted

opnsense-alias-mod#


Modify an existing alias

Base Command#

opnsense-alias-mod

Input#

Argument NameDescriptionRequired
uuidAlias UUID.Required
contentAlias content seperated by comma (NB. will replace actual content!).Required
nameAlias name.Optional
typeAlias type. Possible values are: host, network, port, url, urltable, geoip, networkgroup, mac, external, dynipv6host.Optional
protoAlias protocol. Possible values are: inet, inet6.Optional
enabledAlias enabled. Possible values are: 0, 1.Optional
updatefreqAlias update frequency.Optional
countersAlias statistics. Possible values are: 0, 1.Optional
descriptionAlias description.Optional
auto_commitApply automaticly aliases changes. Possible values are: False, True. Default is False.Optional

Context Output#

PathTypeDescription
OPNSense.AliasunknownAlias UUID modified

opnsense-alias-mod-additem#


Add item into existing alias

Base Command#

opnsense-alias-mod-additem

Input#

Argument NameDescriptionRequired
nameAlias name.Required
entryEntry to add.Optional
auto_commitApply automaticly aliases changes. Possible values are: False, True. Default is False.Optional

Context Output#

PathTypeDescription
OPNSense.AliasunknownAlias UUID modified

opnsense-alias-mod-delitem#


Del item into existing alias

Base Command#

opnsense-alias-mod-delitem

Input#

Argument NameDescriptionRequired
nameAlias name.Required
entryEntry to remove.Optional
auto_commitApply automaticly aliases changes. Possible values are: False, True. Default is False.Optional

Context Output#

PathTypeDescription
OPNSense.AliasunknownAlias UUID modified

opnsense-alias-get#


Get alias details

Base Command#

opnsense-alias-get

Input#

Argument NameDescriptionRequired
uuidAlias UUID.Optional
nameAlias name.Optional

Context Output#

PathTypeDescription
OPNSense.AliasUnknownAlias details
OPNSense.Alias.nameUnknownAlias name
OPNSense.Alias.contentUnknownAlias content
OPNSense.Alias.descriptionUnknownAlias description
OPNSense.Alias.enabledUnknownAlias enabled

opnsense-alias-get-uuid#


Get alias UUID

Base Command#

opnsense-alias-get-uuid

Input#

Argument NameDescriptionRequired
nameAlias name.Required

Context Output#

PathTypeDescription
OPNSense.AliasUnknownAlias UUID

opnsense-interfaces-list#


Get interfaces list

Base Command#

opnsense-interfaces-list

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.InterfacesUnknownInterfaces list

opnsense-category-list#


Get categories list

Base Command#

opnsense-category-list

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.CategoryUnknownCategories list

opnsense-category-add#


Create new category

Base Command#

opnsense-category-add

Input#

Argument NameDescriptionRequired
nameCategory name.Required
autoAutomatically added, will be removed when unused. Possible values are: 0, 1.Optional
colorCategory color (format : #YVWXYZ).Optional

Context Output#

PathTypeDescription
OPNSense.CategoryUnknownCategory UUID

opnsense-category-del#


Delete category with uuid

Base Command#

opnsense-category-del

Input#

Argument NameDescriptionRequired
uuidCategory UUID.Required

Context Output#

PathTypeDescription
OPNSense.CategoryUnknownCategory UUID

opnsense-category-get#


Get category details

Base Command#

opnsense-category-get

Input#

Argument NameDescriptionRequired
uuidCategory UUID.Optional

Context Output#

PathTypeDescription
OPNSense.CategoryUnknownCategory details

opnsense-category-mod#


Modify an axisting category

Base Command#

opnsense-category-mod

Input#

Argument NameDescriptionRequired
uuidCategory UUID.Required
nameCategory name.Optional
colorCategory color (format : #YVWXYZ).Optional
autoAutomatically added, will be removed when unused. Possible values are: 0, 1.Optional

Context Output#

PathTypeDescription
cef2c7d7-68d8-41aa-b6b8-1cac38554d58UnknownCategory UUID

opnsense-rule-list#


Get rules list

Base Command#

opnsense-rule-list

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.RuleUnknownRules list

opnsense-rule-get#


Get rule details

Base Command#

opnsense-rule-get

Input#

Argument NameDescriptionRequired
uuidRule UUID.Required

Context Output#

PathTypeDescription
OPNSense.RuleUnknownRule details
OPNSense.Rule.descriptionUnknownRule description
OPNSense.Rule.enabledUnknownRule enabled
OPNSense.Rule.source_netUnknownSource NET's rule
OPNSense.Rule.destination_netUnknownDestination NET's rule
OPNSense.Rule.interfaceUnknownInterface's rule

opnsense-alias-apply#


Apply configuration

Base Command#

opnsense-alias-apply

Input#

Argument NameDescriptionRequired

Context Output#

There is no context output for this command.

opnsense-device-reboot#


Reboot the device

Base Command#

opnsense-device-reboot

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.DeviceUnknownReboot status

opnsense-firmware-info#


Get firmware info

Base Command#

opnsense-firmware-info

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.FirmwareUnknownFirmware info

opnsense-firmware-status#


Get firmware status

Base Command#

opnsense-firmware-status

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.FirmwareUnknownFirmware status

opnsense-firmware-upgradestatus#


Get firmware upgrade status

Base Command#

opnsense-firmware-upgradestatus

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.FirmwareUnknownFirmware upgrade status

opnsense-firmware-update#


Do firmware update

Base Command#

opnsense-firmware-update

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.FirmwareUnknownFirmware update

opnsense-firmware-upgrade#


Do firmware upgrade

Base Command#

opnsense-firmware-upgrade

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.FirmwareUnknownFirmware upgrade

opnsense-rule-del#


Delete an existing rule

Base Command#

opnsense-rule-del

Input#

Argument NameDescriptionRequired
uuidRule UUID.Required
auto_commitApply automaticly aliases changes. Possible values are: None, True. Default is None.Optional

Context Output#

PathTypeDescription
OPNSense.RuleUnknownRule UUID

opnsense-rule-add#


Create a new rule

Base Command#

opnsense-rule-add

Input#

Argument NameDescriptionRequired
actionRule action. Possible values are: pass, block, reject. Default is pass.Optional
enabledRule enabled. Possible values are: 1, 0. Default is 1.Optional
quickRule quick. Possible values are: 1, 0. Default is 1.Optional
interfaceRule interface.Optional
directionRule direction. Possible values are: in, out. Default is in.Optional
ipprotocolRule IP Protocol. Possible values are: inet, inet6. Default is inet.Optional
protocolRule protocol. Possible values are: any, ICMP, IGMP, GGP, IPENCAP, ST2, TCP, CBT, EGP, IGP, BBN-RCC, NVP, PUP, ARGUS, EMCON, XNET, CHAOS, UDP, MUX, DCN, HMP, PRM, XNS-IDP, TRUNK-1, TRUNK-2, LEAF-1, LEAF-2, RDP, ISO-TP4, NETBLT, MFE-NSP, MERIT-INP, DCCP, 3PC, IDPR, XTP, DDP, IDPR-CMTP, TP++, IL, IPV6, SDRP, IDRP, RSVP, GRE, DSR, BNA, ESP, AH, I-NLSP, SWIPE, NARP, MOBILE, TLSP, SKIP, IPV6-ICMP, CFTP, SAT-EXPAK, KRYPTOLAN, RVD, IPPC, SAT-MON, VISA, IPCV, CPNX, CPHB, WSN, PVP, BR-SAT-MON, SUN-ND, WB-MON, WB-EXPAK, ISO-IP, VMTP, SECURE-VMTP, VINES, TTP, NSFNET-IGP, DGP, TCF, EIGRP, OSPF, SPRITE-RPC, LARP, MTP, AX.25, IPIP, MICP, SCC-SP, ETHERIP, ENCAP, GMTP, IFMP, PNNI, PIM, ARIS, SCPS, QNX, A/N, IPCOMP, SNP, COMPAQ-PEER, IPX-IN-IP, CARP, PGM, L2TP, DDX, IATP, STP, SRP, UTI, SMP, SM, PTP, ISIS, CRTP, CRUDP, SPS, PIPE, SCTP, FC, RSVP-E2E-IGNORE, UDPLITE, MPLS-IN-IP, MANET, HIP, SHIM6, WESP, ROHC, PFSYNC, DIVERT. Default is any.Optional
source_netSource Net. Default is any.Optional
source_notSource NOT. Possible values are: 0, 1. Default is 0.Optional
source_portSource port.Optional
destination_netDestination Net. Default is any.Optional
destination_notDestination NOT. Possible values are: 0, 1. Default is 0.Optional
destination_portDestination port.Optional
logEnable logging. Possible values are: 0, 1. Default is 0.Optional
sequenceProvide a valid sequence for sorting (1 - 99999). Default is 1.Optional
descriptionRule description.Optional
auto_commitApply automaticly aliases changes. Possible values are: None, True. Default is None.Required

Context Output#

PathTypeDescription
OPNSense.RuleUnknownRule UUID

opnsense-rule-mod#


Modify an existing rule

Base Command#

opnsense-rule-mod

Input#

Argument NameDescriptionRequired
uuidRule UUID.Required
actionRule action. Possible values are: pass, block, reject. Default is pass.Optional
enabledRule enabled. Possible values are: 1, 0. Default is 1.Optional
quickRule quick. Possible values are: 1, 0. Default is 1.Optional
interfaceRule interface.Optional
directionRule description. Possible values are: in, out. Default is in.Optional
ipprotocolRule IP protocol. Possible values are: inet, inet6. Default is inet.Optional
protocolRule protocol. Possible values are: any, ICMP, IGMP, GGP, IPENCAP, ST2, TCP, CBT, EGP, IGP, BBN-RCC, NVP, PUP, ARGUS, EMCON, XNET, CHAOS, UDP, MUX, DCN, HMP, PRM, XNS-IDP, TRUNK-1, TRUNK-2, LEAF-1, LEAF-2, RDP, ISO-TP4, NETBLT, MFE-NSP, MERIT-INP, DCCP, 3PC, IDPR, XTP, DDP, IDPR-CMTP, TP++, IL, IPV6, SDRP, IDRP, RSVP, GRE, DSR, BNA, ESP, AH, I-NLSP, SWIPE, NARP, MOBILE, TLSP, SKIP, IPV6-ICMP, CFTP, SAT-EXPAK, KRYPTOLAN, RVD, IPPC, SAT-MON, VISA, IPCV, CPNX, CPHB, WSN, PVP, BR-SAT-MON, SUN-ND, WB-MON, WB-EXPAK, ISO-IP, VMTP, SECURE-VMTP, VINES, TTP, NSFNET-IGP, DGP, TCF, EIGRP, OSPF, SPRITE-RPC, LARP, MTP, AX.25, IPIP, MICP, SCC-SP, ETHERIP, ENCAP, GMTP, IFMP, PNNI, PIM, ARIS, SCPS, QNX, A/N, IPCOMP, SNP, COMPAQ-PEER, IPX-IN-IP, CARP, PGM, L2TP, DDX, IATP, STP, SRP, UTI, SMP, SM, PTP, ISIS, CRTP, CRUDP, SPS, PIPE, SCTP, FC, RSVP-E2E-IGNORE, UDPLITE, MPLS-IN-IP, MANET, HIP, SHIM6, WESP, ROHC, PFSYNC, DIVERT.Optional
source_netSource Net.Optional
source_notSource NOT. Possible values are: 0, 1. Default is 0.Optional
source_portSource port.Optional
destination_netDestination Net.Optional
destination_notDestination NOT.Optional
destination_portDestination port.Optional
logEnable log. Possible values are: 0, 1. Default is 0.Optional
descriptionRule description.Optional
auto_commitApply automaticly aliases changes. Possible values are: None, True. Default is None.Optional

Context Output#

PathTypeDescription
OPNSense.RuleUnknownRule UUID

opnsense-rule-apply#


Apply rules current configuration

Base Command#

opnsense-rule-apply

Input#

Argument NameDescriptionRequired
rollback_revisionRollback revision.Optional

Context Output#

PathTypeDescription
OPNSense.RuleUnknownAction status

opnsense-rule-savepoint#


Save rules current configuration

Base Command#

opnsense-rule-savepoint

Input#

Argument NameDescriptionRequired

Context Output#

PathTypeDescription
OPNSense.RuleUnknownAction status

opnsense-logs-search#


Search into firewall logs

Base Command#

opnsense-logs-search

Input#

Argument NameDescriptionRequired
limitLog search limit. Default is 1000.Optional
ipSearch IP in src or dst.Optional
interfaceInterface search filter.Optional

Context Output#

PathTypeDescription
OPNSense.LogsUnknownOPNSense logs
OPNSense.Logs.interfaceUnknowninterface in logs
OPNSense.Logs.srcUnknownSRC in logs
OPNSense.Logs.srcportUnknownSRCPORT in logs
OPNSense.Logs.dstUnknownDST in logs
OPNSense.Logs.dstportUnknownDSTPORT in logs
OPNSense.Logs.actionUnknownAction in logs
OPNSense.Logs.timestampUnknowntimestamp in logs
OPNSense.Logs.labelUnknownlabel in logs
OPNSense.Logs.protonameUnknownprotoname in logs

opnsense-states-search#


Query states

Base Command#

opnsense-states-search

Input#

Argument NameDescriptionRequired
ipSearch IP in src or dst.Optional

Context Output#

PathTypeDescription
OPNSense.StatesUnknownOPNSense States
OPNSense.States.labelUnknownlabel in states
OPNSense.States.descrUnknownstates description
OPNSense.States.nat_addrUnknownnat address in states
OPNSense.States.nat_portUnknownnat port in states
OPNSense.States.ifaceUnknowninterface in states
OPNSense.States.ipprotoUnknownIP Protocol in states
OPNSense.States.protoUnknownProtocol in states

opnsense-state-del#


Delete state with ID

Base Command#

opnsense-state-del

Input#

Argument NameDescriptionRequired
state_idState ID.Optional

Context Output#

There is no context output for this command.

opnsense-rule-revert#


Revert config to given savepoint

Base Command#

opnsense-rule-revert

Input#

Argument NameDescriptionRequired
rollback_revisionRollback revision.Optional

Context Output#

There is no context output for this command.