aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
blob: a511a4674d1fed8b053dff6f13d6ad905dcb6246 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

Bindle Binaries Linux Firewall
===========================


Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

   * Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.
   * Neither the name of David M. Syzdek nor the
     names of its contributors may be used to endorse or promote products
     derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.


Contents
--------

   1. Overview
   2. Configurations
   3. Source Code
   4. Package Maintence Notes


Overview
========

This package contains the Bindle Binaries firewall script for Linux
systems. BBFW allows an administrator to create separate configuration
files for  global rules (i.e. oraganizational rules), cluster specific
rules, application speciic rules, and server specific firewall rules.
The configuration files containing the rules are loaded in a set order
which allows each level or rules to build upon the previous rules.


Configurations
==============

BBFW uses global configurations, application configurations, cluster
configurations, and local system configurations.  Each set of
configurations may contain iptables, ipsets, pre hook scripts, and post
hook scripts.  The iptables and ipset files are piped into `iptables-restore`
and `ipset restore` after unwrapping escaped new lines and stripping comments.

Files are processed in the following order:

      /etc/firewall.d/global.d/pre-hook   - centrally maintained pre-hook script
      /etc/firewall.d/apps.d/*/pre-hook   - app pre-hook script
      /etc/firewall.d/cluster.d/pre-hook  - cluster specific pre-hook script
      /etc/firewall.d/pre-hook            - host specific pre-hook script
      
      /etc/firewall.d/global.d/ipsets     - centrally maintained IP sets
      /etc/firewall.d/apps.d/*.ipsets     - app specific IP sets
      /etc/firewall.d/cluster.d/ipsets    - cluster specific IP sets
      /etc/firewall.d/ipsets              - host specific IP sets
      
      /etc/firewall.d/apps.d/*.rules4     - app specific IPv4 firewall rules
      /etc/firewall.d/apps.d/*.rules6     - app specific IPv6 firewall rules
      /etc/firewall.d/apps.d/*.rules      - app specific IPv4/IPv6 firewall rules
      
      /etc/firewall.d/rules4              - host specific IPv4 firewall rules
      /etc/firewall.d/rules6              - host specific IPv6 firewall rules
      /etc/firewall.d/rules               - host specific IPv4/IPv6 firewall rules
      
      /etc/firewall.d/cluster.d/rules4    - cluster specific IPv4 firewall rules
      /etc/firewall.d/cluster.d/rules6    - cluster specific IPv6 firewall rules
      /etc/firewall.d/cluster.d/rules     - cluster specific IPv4/IPv6 firewall rules
      
      /etc/firewall.d/global.d/rules4     - centrally maintained IPv4 rules
      /etc/firewall.d/global.d/rules6     - centrally maintained IPv6 rules
      /etc/firewall.d/global.d/rules      - centrally maintained IPv4/IPv6 rules
      
      /etc/firewall.d/global.d/post-hook  - centrally maintained post-hook script
      /etc/firewall.d/apps.d/*/post-hook  - app post-hook script
      /etc/firewall.d/cluster.d/post-hook - host specific post-hook script
      /etc/firewall.d/post-hook           - host specific post-hook script

Hook scripts are called as either `start` or `stop` as the first argument.
These scripts can be used to synchronize configurations from a server,
start/stop daemons, or generate dynamic rules.


Source Code
===========

The source code for this project is maintained using git.  The following
contains information to checkout the source code from the git repository.

Browse Source:

   * [https://github.com/bindle/bbfw](https://github.com/bindle/bbfw)

Git URLs:

   * [git@github.com:bindle/bbfw.git](git@github.com:bindle/bbfw.git)
   * [https://github.com/bindle/bbfw.git](https://github.com/bindle/bbfw.git)

Downloading Source:

      $ git clone https://github.com/bindle/bbfw.git

Preparing Source:

      $ cd bindleadmin
      $ ./build-aux/autogen.sh
      $ ./configure --prefix=/usr --sysconfdir=/etc
      $ make
      $ make install

Git Branches:

   - master - Current release of packages.
   - next   - changes staged for next release
   - pu     - proposed updates for next release
   - xx/yy+ - branch for testing new changes before merging to 'pu' branch


Package Maintence Notes
=======================

This is a collection of notes for developers to use when maintaining this package.

New Release Checklist:

   - Switch to 'master' branch in Git repository.
   - Update version in configure.ac.
   - Update date and version in ChangeLog.
   - Commit configure.ac and ChangeLog changes to repository.
   - Create tag in git repository:

           $ git tag -s v${MAJOR}.${MINOR}

   - Push repository to publishing server:

           $ git push --tags origin master:master next:next pu:pu

Creating Source Distribution Archives:

      $ ./configure
      $ make update
      $ make distcheck
      $ make dist-bzip2