pfsense:suricata:rules:breakdown_of_a_rule
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:suricata:rules:breakdown_of_a_rule [2021/01/21 11:58] – [Source and Destination IP and Port] peter | pfsense:suricata:rules:breakdown_of_a_rule [2021/01/22 10:07] (current) – [Rule Options] peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PFSense - Suricata - Rules - Breakdown of a rule ====== | ====== PFSense - Suricata - Rules - Breakdown of a rule ====== | ||
- | |||
===== Example Rule ===== | ===== Example Rule ===== | ||
Line 15: | Line 14: | ||
* **(msg:" | * **(msg:" | ||
+ | ---- | ||
<WRAP info> | <WRAP info> | ||
Line 34: | Line 34: | ||
---- | ---- | ||
- | ==== Actions ==== | + | ===== Actions |
Actions are performed in the following precedence order by default if multiple rules exist; but can be changed through Action Order. | Actions are performed in the following precedence order by default if multiple rules exist; but can be changed through Action Order. | ||
Line 45: | Line 45: | ||
---- | ---- | ||
- | ==== Protocol ==== | + | ===== Protocol ==== |
* **ip**: | * **ip**: | ||
Line 58: | Line 58: | ||
---- | ---- | ||
- | ==== Source and Destination IP and Port ==== | + | ===== Source |
+ | |||
+ | < | ||
+ | any any -> any any | ||
+ | </ | ||
Source and Destination IP can be configured as: | Source and Destination IP can be configured as: | ||
Line 71: | Line 75: | ||
* **![192.168.1.0/ | * **![192.168.1.0/ | ||
- | Ports act similarly | + | Ports act similarly: |
- | * **< | + | * **any**: Any Port. |
- | * If you want a non-specific range (i.e.: only a maximum or minimum port number), you can do this: [: | + | * **80**: Port 80. |
+ | * **[80:85]**: A range of ports. | ||
+ | * **[:1024]**: Matches all ports from 0-1024. | ||
+ | * **[1024:]**: Matches ports from 1024 to the highest | ||
Direction Specification: | Direction Specification: | ||
- | |||
- | * Between the IP and ports is the direction of packet flow: | ||
* **< | * **< | ||
Line 94: | Line 99: | ||
---- | ---- | ||
- | ==== Rule Options ==== | + | ===== Rule Options ===== |
+ | |||
+ | Options fall into different categories: | ||
+ | |||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | < | ||
+ | msg:" | ||
+ | </ | ||
* The 3 most basic options are: | * The 3 most basic options are: | ||
Line 108: | Line 127: | ||
---- | ---- | ||
- | ---- | + | ==== Other Rule Examples ==== |
- | ---- | + | |
+ | < | ||
alert icmp any any -> \ | alert icmp any any -> \ | ||
any any (msg:" | any any (msg:" | ||
Line 137: | Line 155: | ||
alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg: | alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg: | ||
- | |||
</ | </ | ||
- | |||
- | where: | ||
- | |||
- | * **Action**: | ||
- | * **Header**: | ||
- | * **Options**: | ||
- | |||
- | ---- | ||
---- | ---- | ||
pfsense/suricata/rules/breakdown_of_a_rule.1611230283.txt.gz · Last modified: 2021/01/21 11:58 by peter