Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fgasper/p5-linux-nftables
CPAN’s Linux::NFTables
https://github.com/fgasper/p5-linux-nftables
firewall nftables perl
Last synced: 26 days ago
JSON representation
CPAN’s Linux::NFTables
- Host: GitHub
- URL: https://github.com/fgasper/p5-linux-nftables
- Owner: FGasper
- License: other
- Created: 2022-12-21T20:28:06.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-23T18:36:40.000Z (about 2 years ago)
- Last Synced: 2024-10-21T18:54:09.384Z (2 months ago)
- Topics: firewall, nftables, perl
- Language: Perl
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Linux::NFTables - Perl interface to [libnftables](https://netfilter.org/projects/nftables/)
# SYNOPSIS
my $nft = Linux::NFTables->new()->set_output_options('json');
my $json = $nft->run_cmd("list tables");
# DESCRIPTION
This module provides a Perl interface to
[nftables](https://netfilter.org/projects/nftables/).# CHARACTER\_ENCODING
Strings into & out of this module are byte strings.
# METHODS
## $obj = _CLASS_->new()
Instantiates _CLASS_.
## $yn = _OBJ_->get\_dry\_run()
Returns a boolean that indicates whether _OBJ_ is set to dry-run mode.
## $obj = _OBJ_->set\_dry\_run( \[$yn\] )
Sets or unsets dry-run mode in _OBJ_. If the parameter is not given,
this defaults to **ON**.## $output = _OBJ_->run\_cmd( $CMD )
Passes an arbitrary command string to nftables and returns its output.
## @opts = _OBJ_->get\_output\_options()
Returns a list of names, e.g., `json` or `guid`. Must be called
in list context.Possible values are libnftables’s various `NFT_CTX_OUTPUT_*` constants
(minus that prefix).## $obj = _OBJ_->set\_output\_options( @NAMES )
A setter complement to `get_output_options()`.
## @opts = _OBJ_->get\_debug\_options()
Like `get_output_options()` but for debug options.
Possible values are libnftables’s various `NFT_DEBUG_*` constants
(minux that prefix).## $obj = _OBJ_->set\_debug\_options( @NAMES )
A setter complement to `get_debug_options()`.