Skip to main content

Objective

Create a ferm config for the current docker container setup. This seems useful for automated provisioning of systems (e.g. with ansible) which want to use ferm for their firewall setup.

Usage

Install Ferment via pip:

pip install ferment

You just include a callback to ferment within your ferm.conf:

# -*- shell-script -*-
#
#  Configuration file for ferm(1).
#

table filter {
    chain INPUT {
        policy DROP;

        # connection tracking
        mod state state INVALID DROP;
        mod state state (ESTABLISHED RELATED) ACCEPT;

        # allow local packet
        interface lo ACCEPT;

        # respond to ping
        proto icmp ACCEPT;

        # allow IPsec
        proto udp dport 500 ACCEPT;
        proto (esp ah) ACCEPT;

        # allow SSH connections
        proto tcp dport ssh ACCEPT;
    }
    chain OUTPUT {
        policy ACCEPT;

        # connection tracking
        #mod state state INVALID DROP;
        mod state state (ESTABLISHED RELATED) ACCEPT;
    }
    chain FORWARD {
        policy DROP;

        # connection tracking
        mod state state INVALID DROP;
        mod state state (ESTABLISHED RELATED) ACCEPT;
    }
}

@include '/usr/local/bin/ferment docker config|'

Todo

Since I am not the great firewall guy, I suppose there are some issues with more complex docker setups - I am open for suggestions.

Metadata

Release files for Ferment 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Ferment 0.0.1
File Size Uploaded
Ferment-0.0.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Ferment 0.0.1
File Interpreter ABI Platform
Ferment-0.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 8.5 kB

Release files / Ferment-0.0.1.tar.gz

Download URL Ferment-0.0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
89494f7fe5dfa882fc7feb5bf8a2cb51eb2beabaf483118025b901079edb8f77
BLAKE2b-256 checksum
How to use checksums
c028a8f5163f080224eaa679e7629b3b74ee271fdebdda1c67065358d31baf90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Ferment-0.0.1-py2.py3-none-any.whl

Download URL Ferment-0.0.1-py2.py3-none-any.whl
Size 4.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c96f3f963d57b5a42c604093f266a51bd048ec2449930018e7775e88a83b63bb
BLAKE2b-256 checksum
How to use checksums
6d008d27298cf5c3086096a3043e04837271704ea063a0e1cf5128e266fdc1f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page