summaryrefslogtreecommitdiff
path: root/rule-compiler/examples
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-02-14 16:43:22 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-02-14 16:43:22 -0800
commit8b82f1c6095bc9761a5961154c5c3bd1b57b9510 (patch)
tree15def0fc8e58b9fd0b088ca2f8db53240617a43c /rule-compiler/examples
parentaf4e79735c3f97d4228472077bcd5d2ddfb2cb93 (diff)
downloadinfinitytier-8b82f1c6095bc9761a5961154c5c3bd1b57b9510.tar.gz
infinitytier-8b82f1c6095bc9761a5961154c5c3bd1b57b9510.zip
Add rules compiler script.
Diffstat (limited to 'rule-compiler/examples')
-rw-r--r--rule-compiler/examples/capabilities-and-tags.ztrules40
1 files changed, 40 insertions, 0 deletions
diff --git a/rule-compiler/examples/capabilities-and-tags.ztrules b/rule-compiler/examples/capabilities-and-tags.ztrules
new file mode 100644
index 00000000..9b35f28d
--- /dev/null
+++ b/rule-compiler/examples/capabilities-and-tags.ztrules
@@ -0,0 +1,40 @@
+# This is a default rule set that allows IPv4 and IPv6 traffic.
+# You can edit as needed. If your rule set gets large we recommend
+# cutting and pasting it somewhere to keep a backup.
+
+# Drop all Ethernet frame types that are not IPv4 or IPv6
+drop
+ not ethertype 0x0800 # IPv4
+ not ethertype 0x0806 # IPv4 ARP
+ not ethertype 0x86dd # IPv6
+;
+
+# Capability: outgoing SSH
+cap ssh
+ id 1000
+ accept
+ ipprotocol tcp
+ dport 22
+ ;
+;
+
+# A tag indicating which department people belong to
+tag department
+ id 1000
+ enum 100 sales
+ enum 200 marketing
+ enum 300 accounting
+ enum 400 engineering
+;
+
+# Accept all traffic between members of the same department
+accept
+ tdiff department 0
+;
+
+# You can insert other drop, tee, etc. rules here. This rule
+# set ends with a blanket accept, making it permissive by
+# default.
+
+accept;
+