<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jose jimenez</title>
    <description>The latest articles on DEV Community by jose jimenez (@jose_jimenez_eb51d33ba0fb).</description>
    <link>https://dev.to/jose_jimenez_eb51d33ba0fb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4216175%2F8f4267d7-891e-4107-8449-be34ceb3b9ce.png</url>
      <title>DEV Community: jose jimenez</title>
      <link>https://dev.to/jose_jimenez_eb51d33ba0fb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jose_jimenez_eb51d33ba0fb"/>
    <language>en</language>
    <item>
      <title>Three Layers of Security: My Journey with UFW, Fail2Ban, and Logwatch</title>
      <dc:creator>jose jimenez</dc:creator>
      <pubDate>Thu, 29 Oct 2026 23:54:51 +0000</pubDate>
      <link>https://dev.to/jose_jimenez_eb51d33ba0fb/three-layers-of-security-my-journey-with-ufw-fail2ban-and-logwatch-3fea</link>
      <guid>https://dev.to/jose_jimenez_eb51d33ba0fb/three-layers-of-security-my-journey-with-ufw-fail2ban-and-logwatch-3fea</guid>
      <description>&lt;h1&gt;
  
  
  Strengthening an Existing SIEM Environment with UFW, Fail2Ban, and Logwatch
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1.1 "Teaser" Overview
&lt;/h2&gt;

&lt;p&gt;For this project, I wanted to improve the security of an existing Ubuntu server and strengthen how our Wazuh SIEM monitored security activity. My goal was to add three security tools and observe how they worked together.&lt;/p&gt;

&lt;p&gt;First, I configured UFW to control incoming network traffic and block unwanted connections. Next, I installed Fail2Ban to automatically block IP addresses after repeated failed SSH login attempts. Lastly, I added Logwatch to organize system logs into readable reports, making it easier to review suspicious activity.&lt;/p&gt;

&lt;p&gt;Throughout the project, I tested each tool to see how it interacted with the existing environment. I also learned that different security tools respond to different threats, and that multiple tests are needed to properly evaluate their effectiveness.&lt;/p&gt;

&lt;h2&gt;
  
  
  1.2 Introducing Myself to the Cyber Community
&lt;/h2&gt;

&lt;p&gt;I am new to cybersecurity and currently work as a full-time teacher. I have always enjoyed learning, especially when it comes to technology, coding, and understanding how computer systems work. My interest in cybersecurity has motivated me to develop new technical skills and learn what it takes to become a security professional.&lt;/p&gt;

&lt;p&gt;As a teacher, I understand the importance of patience, problem-solving, and continuous learning. I hope to bring those same skills into cybersecurity as I continue gaining hands-on experience with Linux, network security, and security monitoring tools.&lt;/p&gt;

&lt;p&gt;Projects like this one are helping me build confidence and better understand how cybersecurity professionals protect systems from potential threats.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Project Setup
&lt;/h2&gt;

&lt;p&gt;For this project, I used an existing virtual machine (VM) environment from my Sprint 11 classwork. My main points of interest were the Ubuntu Play Server, Blue-Team Workstation, and Wazuh SIEM.&lt;/p&gt;

&lt;p&gt;My goal was to add three security tools to the existing environment and observe how they interacted with the server and our SIEM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My first modification was UFW (Uncomplicated Firewall).&lt;/strong&gt; I installed and configured UFW on the Ubuntu Play Server to control incoming traffic while allowing necessary connections. I allowed SSH traffic and blocked incoming connections on port 8088.&lt;/p&gt;

&lt;p&gt;To verify that UFW was working, I used Nmap from Kali Linux to scan the server. The results showed port 8088 as &lt;strong&gt;filtered&lt;/strong&gt;, and the firewall logs confirmed that the incoming traffic was blocked. Wazuh also generated an alert for the event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My second modification was Fail2Ban.&lt;/strong&gt; I wanted to add an automated response to repeated failed SSH login attempts. I configured Fail2Ban to ban an IP address for ten minutes after five failed login attempts within a ten-minute period.&lt;/p&gt;

&lt;p&gt;During testing, I attempted multiple incorrect SSH logins from Kali Linux. Fail2Ban successfully detected the attempts and banned the attacking IP address. Wazuh also recorded the event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My third modification was Logwatch.&lt;/strong&gt; I wanted to make reviewing security logs easier by organizing important system activity into readable reports.&lt;/p&gt;

&lt;p&gt;I configured Logwatch to summarize events such as failed SSH login attempts and Fail2Ban activity. During testing, Logwatch successfully generated a report and delivered it to the server's root mailbox.&lt;/p&gt;

&lt;p&gt;After setting up these tools, I used MITRE ATT&amp;amp;CK technique &lt;strong&gt;T1046 – Network Service Discovery&lt;/strong&gt; as the basis for my main firewall test. I manually ran an Nmap scan from Kali Linux to see how UFW and Wazuh responded.&lt;/p&gt;

&lt;p&gt;I also performed a separate SSH password-guessing simulation to test Fail2Ban and reviewed the resulting activity using Logwatch.&lt;/p&gt;

&lt;p&gt;This setup allowed me to see how different security tools could work together to improve protection, automated response, and security monitoring.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Experiment #1 – UFW Firewall
&lt;/h2&gt;

&lt;p&gt;For my first experiment, I wanted to see how adding UFW would affect the existing security environment. My goal was to control incoming network traffic and determine whether Wazuh could detect blocked connections.&lt;/p&gt;

&lt;p&gt;I configured UFW to allow SSH connections while blocking incoming traffic on port 8088.&lt;/p&gt;

&lt;p&gt;To test the firewall, I used Nmap from Kali Linux to perform a network service discovery scan aligned with MITRE ATT&amp;amp;CK technique T1046.&lt;/p&gt;

&lt;p&gt;The scan showed that port 8088 was &lt;strong&gt;filtered&lt;/strong&gt;, indicating that the traffic was being blocked. I also checked the UFW logs and confirmed that Wazuh generated an alert for the blocked connection.&lt;/p&gt;

&lt;p&gt;This experiment showed me how a host-based firewall could add another layer of protection while allowing the existing SIEM to monitor security events.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.2 Experiment #2 – Fail2Ban
&lt;/h2&gt;

&lt;p&gt;For my second experiment, I added Fail2Ban to see how it would interact with our existing SIEM and provide an automated response to suspicious activity.&lt;/p&gt;

&lt;p&gt;My goal was to automatically block an IP address after five incorrect SSH login attempts within ten minutes. Once that limit was reached, Fail2Ban would ban the IP address for ten minutes and record the event in its logs.&lt;/p&gt;

&lt;p&gt;To test this, I attempted multiple incorrect SSH logins from Kali Linux against the Ubuntu Play Server.&lt;/p&gt;

&lt;p&gt;After five failed attempts, Fail2Ban successfully banned the attacking IP address. I verified the ban through the Fail2Ban logs and confirmed that Wazuh generated an alert.&lt;/p&gt;

&lt;p&gt;This experiment demonstrated how Fail2Ban could help protect against password-guessing attacks while allowing the SIEM to monitor the activity.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.3 Experiment #3 – Logwatch
&lt;/h2&gt;

&lt;p&gt;For my third experiment, I wanted to see whether Logwatch could make reviewing security logs easier.&lt;/p&gt;

&lt;p&gt;Before installing Logwatch, I had to manually search through different log files to find important security events. This process could be time-consuming, especially when trying to identify specific activity.&lt;/p&gt;

&lt;p&gt;I installed and configured Logwatch to summarize system events, including failed SSH login attempts and Fail2Ban activity.&lt;/p&gt;

&lt;p&gt;During testing, Logwatch successfully generated a security report and delivered it to the server's root mailbox. The report presented the information in a much more readable format, making it easier to identify suspicious activity.&lt;/p&gt;

&lt;p&gt;This experiment showed me how Logwatch could complement Wazuh. While Wazuh provided centralized security monitoring and alerts, Logwatch helped summarize local system activity for further review.&lt;/p&gt;

&lt;p&gt;4.1 Summary of Experimental Findings&lt;/p&gt;

&lt;p&gt;I originally expected that I could install all three security tools and use one Atomic Red Team test, T1046 – Network Service Discovery, to see how they would respond to a potential threat.&lt;/p&gt;

&lt;p&gt;However, I quickly learned that although all three tools worked and complemented each other, they did not necessarily respond to the same type of attack. Each tool was designed for a different purpose, meaning that multiple tests were needed to evaluate their effectiveness.&lt;/p&gt;

&lt;p&gt;During my first experiment, I used Nmap to simulate network service discovery. UFW successfully blocked traffic on port 8088, and Wazuh generated an alert.&lt;/p&gt;

&lt;p&gt;For my second experiment, I simulated repeated failed SSH login attempts. After five incorrect attempts, Fail2Ban automatically banned the attacking IP address for ten minutes. Wazuh also recorded the event.&lt;/p&gt;

&lt;p&gt;Lastly, Logwatch summarized security activity into readable reports, making it easier to review failed login attempts and other important system events.&lt;/p&gt;

&lt;p&gt;One of my biggest takeaways was learning that not every security tool responds to every threat.&lt;/p&gt;

&lt;p&gt;UFW focuses on controlling network traffic, Fail2Ban automatically responds to repeated failed login attempts, and Logwatch organizes security information for further analysis.&lt;/p&gt;

&lt;p&gt;Although these tools serve different purposes, using them together provided a wider range of protection and monitoring than I originally expected.&lt;/p&gt;

&lt;p&gt;Overall, this project helped me better understand how different security tools can complement an existing SIEM and contribute to a stronger defense-in-depth security strategy.&lt;/p&gt;

&lt;p&gt;4.2 Advice on Avoiding Mistakes&lt;/p&gt;

&lt;p&gt;One of the biggest lessons I learned was the importance of practicing Linux commands and carefully reviewing configuration files before making changes.&lt;/p&gt;

&lt;p&gt;Small mistakes, such as incorrect syntax, missing characters, or improperly formatted configuration files, can prevent security tools from working correctly. Double-checking commands and understanding what they do can save a lot of troubleshooting time.&lt;/p&gt;

&lt;p&gt;Another important lesson was to test each modification individually before moving on to the next experiment.&lt;/p&gt;

&lt;p&gt;For example, I initially had trouble enabling UFW and had to troubleshoot the command before successfully activating the firewall. I also learned that different connection results, such as "connection refused" and "filtered," can tell us important information about how a system is responding.&lt;/p&gt;

&lt;p&gt;I also recommend paying close attention to timestamps, log formats, and security alerts when working with monitoring tools like Wazuh. During this project, finding the correct log events was sometimes challenging, which showed me the importance of carefully reviewing how logs are recorded and displayed.&lt;/p&gt;

&lt;p&gt;My biggest advice is to be patient, document your progress, and verify that each tool works before adding another.&lt;/p&gt;

&lt;p&gt;Troubleshooting is part of learning, and understanding why something does not work can be just as valuable as successfully completing the experiment.&lt;/p&gt;

&lt;p&gt;5.1 The Coolest Thing I Learned&lt;/p&gt;

&lt;p&gt;One of the coolest things I learned during this project was how much troubleshooting is involved in cybersecurity.&lt;/p&gt;

&lt;p&gt;Although troubleshooting was extremely time-consuming, I found it surprisingly fun and rewarding. I enjoyed learning new Linux commands, reviewing configuration files, and searching through logs to find the source of a problem.&lt;/p&gt;

&lt;p&gt;At times, it felt like looking for a needle in a haystack, especially when one small mistake prevented something from working correctly.&lt;/p&gt;

&lt;p&gt;One of my favorite moments was finally getting UFW to work properly and seeing the blocked traffic appear in our Wazuh alerts.&lt;/p&gt;

&lt;p&gt;That experience showed me how important patience, attention to detail, and problem-solving are in cybersecurity.&lt;/p&gt;

&lt;p&gt;I learned that troubleshooting is not just about fixing problems. It is also about understanding how systems work and why they behave the way they do.&lt;/p&gt;

&lt;p&gt;5.2 One Piece of Advice&lt;/p&gt;

&lt;p&gt;Always, and I mean always, double-check or even triple-check your commands and configuration files before running them.&lt;/p&gt;

&lt;p&gt;Make sure your syntax is correct, your commands are properly written, and any required opening and closing characters are in place. Even the smallest mistake can cause errors that take a long time to troubleshoot.&lt;/p&gt;

&lt;p&gt;I also recommend testing one modification at a time and making sure it works before moving on to the next step.&lt;/p&gt;

&lt;p&gt;A few extra minutes of reviewing your work can save you hours of frustration later.&lt;/p&gt;

&lt;p&gt;5.3 My Favorite Resource&lt;/p&gt;

&lt;p&gt;Fail2Ban Official GitHub Repository:&lt;br&gt;
&lt;a href="https://github.com/fail2ban/fail2ban" rel="noopener noreferrer"&gt;https://github.com/fail2ban/fail2ban&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of my favorite resources throughout this project was the official Fail2Ban GitHub repository.&lt;/p&gt;

&lt;p&gt;It provided straightforward information that helped me understand how Fail2Ban works and how to configure it on my Ubuntu server.&lt;/p&gt;

&lt;p&gt;I found it especially useful when learning how to monitor failed SSH login attempts and automatically ban suspicious IP addresses.&lt;/p&gt;

&lt;p&gt;Having access to documentation and configuration examples made troubleshooting easier and helped me understand the purpose of the commands I was using.&lt;/p&gt;

&lt;p&gt;This resource was helpful because it encouraged me to understand what I was doing instead of simply copying commands.&lt;/p&gt;

&lt;p&gt;5.4 Thank You (Gratitudes)!&lt;/p&gt;

&lt;p&gt;I would like to give a special thank you to my career coach, Sergio, for continuously pushing and motivating me to finish this project.&lt;/p&gt;

&lt;p&gt;Learning cybersecurity while balancing my responsibilities as a full-time teacher has not always been easy. There were moments when troubleshooting became frustrating and time-consuming, but his encouragement helped me keep moving forward.&lt;/p&gt;

&lt;p&gt;I am grateful for Sergio's support and motivation throughout this learning experience.&lt;/p&gt;

&lt;p&gt;I am excited to continue learning, improving my technical skills, and working toward becoming a cybersecurity professional.&lt;/p&gt;

&lt;p&gt;References&lt;/p&gt;

&lt;p&gt;Ubuntu Server – Firewall Documentation&lt;br&gt;
&lt;a href="https://ubuntu.com/server/docs/firewalls/" rel="noopener noreferrer"&gt;https://ubuntu.com/server/docs/firewalls/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK – T1046: Network Service Discovery&lt;br&gt;
&lt;a href="https://attack.mitre.org/techniques/T1046/" rel="noopener noreferrer"&gt;https://attack.mitre.org/techniques/T1046/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fail2Ban – Official GitHub Repository&lt;br&gt;
&lt;a href="https://github.com/fail2ban/fail2ban" rel="noopener noreferrer"&gt;https://github.com/fail2ban/fail2ban&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK – T1110.001: Password Guessing&lt;br&gt;
&lt;a href="https://attack.mitre.org/techniques/T1110/001/" rel="noopener noreferrer"&gt;https://attack.mitre.org/techniques/T1110/001/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Logwatch – Official Project Page&lt;br&gt;
&lt;a href="https://sourceforge.net/projects/logwatch/" rel="noopener noreferrer"&gt;https://sourceforge.net/projects/logwatch/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>monitoring</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
  </channel>
</rss>
