A formal semantics of the Linux netfilter iptables firewall. Written in the Isabelle interactive proof assistant.
It features
$ git clone https://github.com/diekmann/Iptables_Semantics.git
Don't want to install Isabelle? Don't want to mess with formulas or proofs? Just want a working tool? Cool, checkout our stand-alone Haskell tool!
Component | Status |
---|---|
Haskell tool |
See README.md in haskell_tool.
32C3: Verified Firewall Ruleset Verification, Cornelius Diekmann, Hamburg, Germany, December 2015 [description] [video] [youtube mirror]
The raw data of the iptables rulesets from the Examples is stored in this repositoy.
This repository is probably not up to date and still uses Isabelle2016-1. Get the theories for the current Isabelle release directly from the afp.
Checking all proofs:
$ isabelle build -v -D . -o document=pdf
This needs about 14 CPU hours (about 7 hours real time on an x220, i7 2.7GHz, 16GB ram).
The session Iptables_Semantics_Examples_Large1
needs about 5-6 hours CPU time and Iptables_Semantics_Examples_Large2
needs about 7 hours of CPU time; you may want to skip those.
Building the documentation:
$ isabelle build -d . -v -o document=pdf Iptables_Semantics_Documentation
The build takes less than 10 minutes on my laptop (14min CPU time, 2 threads). The documentation summarizes the most important definitions and theorems. It is deliberately very very brief and only provides results. It should contain the summarizing correctness theorems for all executable functions we export. This is probably the best point to get started working with the theory files.
To develop, we suggest to load the Bitmagic theory as heap-image:
$ isabelle jedit -d . -l Bitmagic
Check the Examples directory to get started