Skip to content

Commit b2a5fdf

Browse files
authored
Merge pull request #1464 from madeline-underwood/snort3
Snort3_approved by AP for release.
2 parents c624720 + b08e676 commit b2a5fdf

File tree

5 files changed

+96
-87
lines changed

5 files changed

+96
-87
lines changed

content/learning-paths/servers-and-cloud-computing/snort3-multithreading/_index.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
---
2-
title: Scaling Snort 3 - use multithreading for improved performance
3-
4-
draft: true
5-
cascade:
6-
draft: true
2+
title: Optimize the performance of Snort 3 using multithreading
73

84
minutes_to_complete: 45
95

10-
who_is_this_for: This blog is for engineers familiar with Snort who want to enhance its performance by leveraging the benefits of multithreading.
6+
who_is_this_for: This Learning Path is for software developers familiar with Snort who want to optimize performance by leveraging the benefits of multithreading.
117

128
learning_objectives:
13-
- Install Snort with all of its dependencies.
9+
- Install Snort and dependencies.
1410
- Configure Snort Lua files to enable multithreading.
1511
- Use multithreading to process capture files and measure performance.
1612

1713
prerequisites:
18-
- An Arm-based instance from a cloud provider or an Arm server running Ubuntu 20.04 or 22.04.
14+
- An Arm-based instance from a cloud provider, or an Arm server running Ubuntu 20.04 or 22.04.
1915
- A basic understanding of Snort's operation and configuration.
2016

2117

content/learning-paths/servers-and-cloud-computing/snort3-multithreading/_next-steps.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
next_step_guidance: To continue learning about enabling hyperscan on arm,please refer to the learning path provided below.
2+
next_step_guidance: To continue learning, try this next Learning Path about enabling hyperscan on Arm.
33

44
recommended_path: /learning-paths/servers-and-cloud-computing/vectorscan/
55

@@ -20,3 +20,5 @@ weight: 21 # set to always be larger than the content in this p
2020
title: "Next Steps" # Always the same
2121
layout: "learningpathall" # All files under learning paths have this same wrapper
2222
---
23+
24+

content/learning-paths/servers-and-cloud-computing/snort3-multithreading/_review.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ review:
77
- It allows Snort to detect encrypted traffic.
88
- It improves packet processing performance.
99
- It enables Snort to be run on legacy hardware.
10-
- It support multiple rule sets at the same time.
10+
- It supports multiple rule sets at the same time.
1111
correct_answer: 2
1212
explanation: >
1313
It improves packet processing performance by parallelizing tasks.
@@ -16,26 +16,25 @@ review:
1616
question: >
1717
Which parameter is used to enable multithreading in Snort 3?
1818
answers:
19-
- --max-packet-threads
20-
- --enable-threads
21-
- --enable-multithreading
22-
- --packet-loop
19+
- --max-packet-threads.
20+
- --enable-threads.
21+
- --enable-multithreading.
22+
- --packet-loop.
2323
correct_answer: 1
2424
explanation: >
2525
--max-packet-threads parameter is used to enable and configure multithreading.
2626
2727
- questions:
2828
question: >
29-
In Snort 3, which DAQ (Data Acquisition) module is used to read capture files for packet processing?
29+
In Snort 3, which Data Acquisition (DAQ) module is used to read capture files for packet processing?
3030
answers:
31-
- afpacket
32-
- vpp
33-
- dump
34-
- pcap
31+
- afpacket.
32+
- vpp.
33+
- dump.
34+
- pcap.
3535
correct_answer: 3
3636
explanation: >
37-
The dump module in Snort 3 is used to read capture files (such as .pcap or .pcapng files) for offline packet analysis.
38-
37+
The dump module in Snort 3 is used to read capture files, such as .pcap or .pcapng files, for offline packet analysis.
3938
4039
4140
# ================================================================================

content/learning-paths/servers-and-cloud-computing/snort3-multithreading/build-and-install.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
---
2-
title: Installing Snort 3 and the required dependencies
2+
3+
title: Install Snort 3 and Dependencies
34
weight: 2
45

56
### FIXED, DO NOT MODIFY
67
layout: learningpathall
78
---
89

9-
Snort is an Open Source Intrusion Prevention System (IPS). Snort uses a series of rules to define malicious network activity. If malicious activity is found, Snort generates alerts.
10+
## Snort 3
11+
12+
Snort is an Open Source Intrusion Prevention System (IPS). Snort uses a series of rules to define malicious network activity. If malicious activity is detected, Snort generates alerts.
13+
14+
Snort 3 benefits from multithreading, which means that it enables the concurrent processing of multiple packet processing threads with a single Snort instance. This optimization frees up additional memory for further packet processing.
15+
16+
#### Enable multithreading
1017

11-
Multithreading in Snort 3 refers to the ability to associate multiple threads with a single Snort instance enabling the concurrent processing of multiple packet files. This optimization frees up additional memory for further packet processing.
18+
In order to enable multithreading in Snort 3, specify the quantity of threads designated for processing network traffic using either of these two options:
1219

13-
In order to enable multithreading in Snort 3, specify the number of threads designated for processing network traffic using either the `--max-packet-threads` or `-z` option.
20+
* `--max-packet-threads`
21+
* `-z`
1422

1523
{{%notice Note%}}
16-
The instructions provided have been tested on AWS EC2 Graviton4 instance, based on Neoverse V2. The examples are easiest to use if you have at least 16 cores in the system.
24+
These instructions have been tested on an AWS EC2 Graviton4 instance, based on Arm Neoverse V2. The examples work best if you have at least 16 cores in your system.
1725
{{%/notice%}}
1826

19-
## Compile and build Snort3
27+
### How do I compile and build Snort 3?
2028

21-
To install Snort 3, use a text editor to save the script below on your Arm server in a file named `install-snort.sh`.
29+
To install Snort 3, use a text editor to copy-and-paste the text below and save the script on your Arm server in a file named `install-snort.sh`.
2230

2331
<!-- add github link for the below file [build_snort3.sh]() -->
2432
``` bash
@@ -40,7 +48,7 @@ declare -a PACKAGE_URLS=(
4048
"https://github.com/gperftools/gperftools/releases/download/gperftools-2.13/gperftools-2.13.tar.gz"
4149
)
4250

43-
downlaodPackages()
51+
downloadPackages()
4452
{
4553
for url in "${PACKAGE_URLS[@]}"; do
4654
# Extract the file name from the URL
@@ -89,7 +97,7 @@ installPackages()
8997
sudo apt-get install -y $LIST_OF_APPS
9098

9199
# required to get optimized result from Snort3
92-
downlaodPackages
100+
downloadPackages
93101
mkdir -p ${ROOT_DIR}/snort3
94102
tar -xzf 3.3.5.0.tar.gz --directory ${ROOT_DIR}/snort3 --strip-components=1
95103
echo "@@@@@@@@@@@@@@@@@@ Installing Snort3 Dependencies ... @@@@@@@@@@@@@@@@@@@@"
@@ -193,21 +201,21 @@ echo 'make sure to source ~/.bashrc or set LD_LIBRARY_PATH using:"'
193201
echo ' export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"'
194202
```
195203

196-
The script takes 2 arguments:
197-
- the directory used to build Snort3 and its dependencies
198-
- the number of processors to use for the build.
204+
The script takes two arguments:
205+
* The directory used to build Snort 3 and its dependencies.
206+
* The number of processors to use for the build.
199207

200-
To build in a new directory named `build` with the number of processors in your system, run the script:
208+
To create a new directory named `build` which lists the number of processors in your system, run the script:
201209

202210
```bash
203211
bash ./install-snort.sh build `nproc`
204212
```
205213

206-
You don't need to run the script as `root` but it assumes you are on Ubuntu 20.04 or 22.04 and have sudo permission.
214+
You do not need to run the script as `root`, but you do need to be running Ubuntu 20.04 or 22.04, and have sudo permission.
207215

208-
When the build completes you have the `snort3` directory with all compiled software, and the `snort` executable is located in `/usr/local/bin`.
216+
When the build completes, you will have the Snort 3 directory with all compiled software, and the `snort` executable will be located in `/usr/local/bin`.
209217

210-
To verify the installation is complete, run the command below and see the version printed:
218+
To verify completed installation, run the command below and look at the version that it prints to screen:
211219

212220
```bash { output_lines = "2-20" }
213221
snort -V
@@ -228,6 +236,8 @@ To verify the installation is complete, run the command below and see the versio
228236
229237
```
230238
231-
Don't delete the `build` directory as it will be used in the next step.
239+
{{% notice Note %}}
240+
Do not delete the `build` directory as you will use it in the next step.
241+
{{% /notice %}}
232242
233-
Proceed to learn how to test Snort3 multithreading.
243+
Now you can move on to learn about how to test Snort 3 multithreading.

0 commit comments

Comments
 (0)