Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pfcli

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pfcli

A CLI for managing pfSense configurations

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
1

PfCLI

License: MPL 2.0 Build PyPI security: bandit

:warning: No guarantees of any kind: this is a work in progress, only a few features are implemented, and none of them are under automated testing. The application depends on private pfSense API functionality, so the application might break, or mess up your pfSense appliance's config

Allows you to access PfSense machines through CLI, which should make headless management easier. The application uses the XML-RPC interface provided natively by PfSense.

Requirements

  • Python >= 3.11 - older versions might work, but are not supported
  • Netgate pfSense Plus, 23.09-RELEASE :warning: this is the only version that I tested

Installation

pipx install pfcli

Configuration

The following environment variables are available to configure the application:

NameDefaultDescription
PFCLI_PFSENSE_SCHEMEhttpsWhat scheme does the pfSense web interface listen on?
PFCLI_PFSENSE_HOSTNAME192.168.0.1To what hostname or IP address does the pfSense web interface respond?
PFCLI_PFSENSE_USERNAMEadminWhat is the username for your pfSense web interface?
PFCLI_PFSENSE_PASSWORDpfsenseWhat is the password for your pfSense web interface?

Want to use config from a file instead?

Step 1 Create a file .env, with contents as described below - adjust for your situation

PFCLI_PFSENSE_SCHEME=https
PFCLI_PFSENSE_HOSTNAME=192.168.0.1
PFCLI_PFSENSE_USERNAME=admin
PFCLI_PFSENSE_PASSWORD=pfsense

Step 2 Load the variables from .env

export $(xargs < .env)

Examples

List all domain overrides

pfcli unbound list-host-overrides --output json

Example output:

[
  {
    "domain": "yourdomain.tld",
    "host": "yourhost",
    "ip": "x.x.x.x",
    "aliases": [
      {
        "host": "youraliashost",
        "domain": "somedomain.tld",
        "description": "your host override alias description"
      }
    ],
    "description": "your host override description"
  }
]

Print version information

pfcli firmware version --output text

Example output:

config:
 version: 23.3

kernel:
 version: 14.0

platform: Netgate pfSense Plus

version: 23.09-RELEASE

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

MPL-2.0

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc