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)
| File | Size | Uploaded | |
|---|---|---|---|
| Ferment-0.0.1.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 |