Commits

wodny  committed 5a02ecc

README

  • Participants
  • Parent commits 41c7008

Comments (0)

Files changed (2)

+iptables mapper
+===============
+
+Creates a DOT graph definition from iptables rules.
+
+::
+
+    iptables-save | ./iptables-transitions.py | dot -Tpng >| graph.png
+
+.. vi: ft=rst

File iptables-transitions.py

     rule_match = re_rule.match(line)
     if rule_match:
         (chain_from, chain_to) = rule_match.groups()
-#        if chain_from not in tables[table]:
-#            tables[table][chain_from] = set()
         tables[table][chain_from].chains_to |= set([Chain(chain_to)])
 
 print("""