.. _vyos.rest.vyos_firewall_interfaces_module:
**********************************
vyos.rest.vyos_firewall_interfaces
**********************************
**Manage firewall hook filters on VyOS devices using REST API**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages firewall hook filter configuration on VyOS devices via the REST API.
- In VyOS 1.5+, firewall hook filters (input/output/forward) replace the per-interface firewall assignments used in VyOS 1.4.
- Hook filters apply globally to all traffic traversing that hook point.
- Uses REST API (``connection=httpapi``) instead of CLI.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
list
/ elements=dictionary
|
|
Firewall hook filter configuration.
|
|
afi
string
/ required
|
|
Address family.
|
|
hooks
list
/ elements=dictionary
|
|
Hook filter configurations for this address family.
|
|
|
default_action
string
|
Choices:
- accept
- drop
- reject
|
Default action when no rule matches.
|
|
|
description
string
|
|
Filter description.
|
|
|
hook
string
/ required
|
Choices:
- input
- output
- forward
|
Netfilter hook point.
|
|
|
rules
list
/ elements=dictionary
|
|
Rules in this hook filter.
|
|
|
|
action
string
|
Choices:
- accept
- drop
- reject
- return
- queue
- continue
|
Rule action.
|
|
|
|
description
string
|
|
Rule description.
|
|
|
|
destination
dictionary
|
|
Destination match criteria.
|
|
|
|
|
address
string
|
|
Destination IP address or prefix.
|
|
|
|
|
port
string
|
|
Destination port or range.
|
|
|
|
disable
boolean
|
|
Disable this rule.
|
|
|
|
log
boolean
|
|
Enable logging.
|
|
|
|
number
integer
/ required
|
|
Rule number.
|
|
|
|
protocol
string
|
|
Protocol to match.
|
|
|
|
source
dictionary
|
|
Source match criteria.
|
|
|
|
|
address
string
|
|
Source IP address or prefix.
|
|
|
|
|
port
string
|
|
Source port or range.
|
|
|
|
state
string
|
Choices:
- established
- invalid
- new
- related
|
Connection state to match.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
|
Desired state of the firewall hook filter configuration.
merged adds or updates without removing existing config.
replaced replaces hook filter config for named hooks in config.
overridden replaces all firewall hook filter config.
deleted removes firewall hook filter config.
gathered returns current configuration as structured data.
|