{"id":14118,"date":"2022-01-20T19:20:14","date_gmt":"2022-01-20T19:20:14","guid":{"rendered":"https:\/\/linuxways.net\/?p=14118"},"modified":"2022-01-20T19:20:14","modified_gmt":"2022-01-20T19:20:14","slug":"how-to-install-snort-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-snort-on-ubuntu-20-04\/","title":{"rendered":"How to Install Snort on Ubuntu 20.04"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Snort is a useful open source to protect against network intrusion on the system also known as NIDS. Over a specific network interface, Snort can monitor packet data sent and received.<\/p>\n<p>Using signature-based detection and protocol analysis technologies NIDS can detect threats that target weaknesses and vulnerabilities in your system. Once you have installed and configured it correctly, NIDS software can identify different types of attacks and suspicions.<\/p>\n<p>Here we will guide you on how to install Snort on Ubuntu 20.04 as we go through below.<\/p>\n<h2>Step 1 &#8211; Update the system<\/h2>\n<p>Run the apt command to update:<\/p>\n<pre>$ sudo apt update<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1042\" height=\"125\" class=\"wp-image-14119\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-419.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-419.png 1042w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-419-300x36.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-419-1024x123.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-419-768x92.png 768w\" sizes=\"auto, (max-width: 1042px) 100vw, 1042px\" \/><\/p>\n<h2>Step 2 &#8211; Install required libraries<\/h2>\n<p>Run the following command:<\/p>\n<pre>$ sudo apt-get install build-essential libpcap-dev libpcre3-dev libnet1-dev zlib1g-dev luajit hwloc libdnet-dev libdumbnet-dev bison flex liblzma-dev openssl libssl-dev pkg-config libhwloc-dev cmake cpputest libsqlite3-dev uuid-dev libcmocka-dev libnetfilter-queue-dev libmnl-dev autotools-dev libluajit-5.1-dev libunwind-dev<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1042\" height=\"589\" class=\"wp-image-14120\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-420.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-420.png 1042w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-420-300x170.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-420-1024x579.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-420-768x434.png 768w\" sizes=\"auto, (max-width: 1042px) 100vw, 1042px\" \/><\/p>\n<p>After completing the installation. create a directory containing the compilation and source files for Snort:<\/p>\n<pre>$ mkdir snort-source-files<\/pre>\n<pre>$ cd snort-source-files<\/pre>\n<p>Then install<strong> LibDAQ<\/strong>:<\/p>\n<pre>$ git clone <a href=\"https:\/\/github.com\/snort3\/libdaq.git\">https:\/\/github.com\/snort3\/libdaq.git<\/a><\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1041\" height=\"225\" class=\"wp-image-14121\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-421.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-421.png 1041w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-421-300x65.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-421-1024x221.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-421-768x166.png 768w\" sizes=\"auto, (max-width: 1041px) 100vw, 1041px\" \/><\/p>\n<p>Run the following commands:<\/p>\n<pre>$ cd libdaq<\/pre>\n<pre>$ .\/bootstrap<\/pre>\n<pre>$ .\/configure<\/pre>\n<pre>$ make<\/pre>\n<pre>$ sudo make install<\/pre>\n<p>Then install<strong> Tcmalloc<\/strong>:<\/p>\n<pre>$ cd ..\/<\/pre>\n<pre>$ wget <a href=\"https:\/\/github.com\/gperftools\/gperftools\/releases\/download\/gperftools-2.9.1\/gperftools-2.9.1.tar.gz\">https:\/\/github.com\/gperftools\/gperftools\/releases\/download\/gperftools-2.9.1\/gperftools-2.9.1.tar.gz<\/a><\/pre>\n<pre>$ tar xzf gperftools-2.9.1.tar.gz<\/pre>\n<pre>$ cd gperftools-2.9.1\/<\/pre>\n<pre>$ .\/configure<\/pre>\n<pre>$ make<\/pre>\n<pre>$ sudo make install<\/pre>\n<h2>Step 3 &#8211; Installing Snort 3<\/h2>\n<p>1. Run the following commands:<\/p>\n<pre>$ cd ..\/<\/pre>\n<pre>$ git clone git:\/\/github.com\/snortadmin\/snort3.git<\/pre>\n<p>Output: <img loading=\"lazy\" decoding=\"async\" width=\"1041\" height=\"213\" class=\"wp-image-14122\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-422.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-422.png 1041w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-422-300x61.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-422-1024x210.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-422-768x157.png 768w\" sizes=\"auto, (max-width: 1041px) 100vw, 1041px\" \/><\/p>\n<p>2. Navigate to the <strong>snort3<\/strong> directory<\/p>\n<pre>$ cd snort3\/<\/pre>\n<p>3. Configure and enable <strong>tcmalloc<\/strong><\/p>\n<pre>$ .\/configure_cmake.sh --prefix=\/usr\/local --enable-tcmalloc<\/pre>\n<p>4. Navigate to the <strong>build<\/strong> directory to compile and install Snort 3<\/p>\n<pre>$ cd build<\/pre>\n<pre>$ make<\/pre>\n<pre>$ sudo make install<\/pre>\n<p>5. Update shared libraries<\/p>\n<pre>$ sudo ldconfig<\/pre>\n<p>6. Create a symlink for \/usr\/sbin\/snort, run the command:<\/p>\n<pre>$ sudo ln -s \/usr\/local\/bin\/snort \/usr\/sbin\/snort<\/pre>\n<p>7. Check if the installation was successful<\/p>\n<pre>$ snort -V<\/pre>\n<p>Output: <img loading=\"lazy\" decoding=\"async\" width=\"1043\" height=\"345\" class=\"wp-image-14123\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-423.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-423.png 1043w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-423-300x99.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-423-1024x339.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-423-768x254.png 768w\" sizes=\"auto, (max-width: 1043px) 100vw, 1043px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>The article above has shown you how to install Snort on Ubuntu 20.04.<\/p>\n<p>Thanks for reading!<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction Snort is a useful open source to protect against network intrusion on the system also known as NIDS. Over a specific network interface, Snort can monitor packet&hellip;<\/p>","protected":false},"author":1,"featured_media":14245,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[859,100],"class_list":["post-14118","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-snort","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=14118"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14118\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/14245"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=14118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=14118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=14118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}