You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wiki/Rules.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,24 +36,34 @@ Rules are stored as JSON files inside the `-rule-path` folder, in the simplest c
36
36
| precedence | true or false. Sets if a rule take precedence (>= v1.2.0)|
37
37
| action | Can be `deny`, `reject` or `allow`. |
38
38
| duration | For rules persisting on disk, this value is default to `always`. |
39
-
| operator.type | Can be `simple`, in which case a simple `==` comparison will be performed, `regexp` if the `data` field is a regular expression to match, `network` which will match a network range (127.0.0.1/8), `lists` which will look for matches on lists of something (domains, IPs, etc), or `list`, which is a combination of all of the types.|
40
-
| operator.operand | What element of the connection to compare, can be one of: |
||`simple` is a simple `==` comparison. `regexp` will match the regexp from the `data` field against the Operand, `network` which will match a network range (127.0.0.1/8), `lists` will look for matches on lists of something (domains, IPs, etc), and `list`, a combination of all of the previous types. |
41
+
| operator.data | The data to compare the `operand` to, can be a regular expression if `type` is `regexp`, or a path to a directory with list of IPs/domains in the case of `lists`. |
42
+
| operator.operand | Element of the connection to compare against, can be one of: |
41
43
||*`true` (will always match) |
42
-
||*`process.path` (the path of the executable) |
43
-
||*`process.id` PID|
44
-
||*`process.command` (full command line, including path and arguments)|
45
-
| |*`provess.env.ENV_VAR_NAME` (use the value of an environment variable of the process given its name)
44
+
||*`process.path` (the absolute path of the executable) |
45
+
||*`process.id` PID of the process|
46
+
||*`process.command` (full command line, including path and arguments). Note that cmdlines can contain or not the process, and the path can be absolute or relative (`./cmd -x a`)|
47
+
||*`process.parent.path` (v1.7.0) check against ONE of the parent path. Include more parent paths to match the tree of a process. |
48
+
||*`provess.env.ENV_VAR_NAME` (use the value of an environment variable of the process given its name). |
49
+
||*`process.hash.md5` (v1.7.0) |
46
50
||*`user.id` (UID)|
51
+
||*`user.name` user name (v1.7.0). Check against a regular system username (no namespaces, containers or virtual user names).|
47
52
||*`protocol`|
53
+
||*`source.port`|
54
+
||*`source.ip`|
55
+
||*`source.network`|
48
56
||*`dest.ip`|
49
57
||*`dest.host`|
50
-
||*`dest.network` (>= v1.3.0)|
58
+
||*`dest.network` (v1.3.0)|
51
59
||*`dest.port`|
52
-
||*`lists.domains` (>= 1.4.0) lists of domains in hosts format [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
53
-
||*`lists.domains_regexp` (>= 1.5.0) list of domains with regular expressions (`.*\.example\.com`) [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
54
-
||*`lists.ips` (>= 1.5.0) list of IPs [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
55
-
||*`lists.nets` (>= 1.5.0) list of network ranges [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
56
-
| operator.data | The data to compare the `operand` to, can be a regular expression if `type` is `regexp`, or a path to a directory with list of IPs/domains in the case of `lists`. |
60
+
||*`iface.in` (v1.6.0) |
61
+
||*`iface.out` (v1.6.0) |
62
+
||*`lists.domains` (v1.4.0) lists of domains in hosts format [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
63
+
||*`lists.domains_regexp` (v1.5.0) list of domains with regular expressions (`.*\.example\.com`) [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
64
+
||*`lists.ips` (v1.5.0) list of IPs [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
65
+
||*`lists.nets` (v1.5.0) list of network ranges [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
0 commit comments