<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Security on Panic! At The Terminal</title>
		<link>https://blog.nousiainen.xyz/docs/security/</link>
		<description>Recent content in Security on Panic! At The Terminal</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<atom:link href="https://blog.nousiainen.xyz/docs/security/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Fail2ban SSH Protection on RHEL9: Installation and Configuration Guide</title>
				<link>https://blog.nousiainen.xyz/docs/security/fail2ban-ssh-protection-guide/</link>
				<pubDate>Mon, 28 Jul 2025 00:00:00 +0000</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/security/fail2ban-ssh-protection-guide/</guid>
				<description>&lt;h1 id=&#34;fail2ban-ssh-protection-on-rhel9-installation-and-configuration-guide&#34;&gt;&#xA;  Fail2ban SSH Protection on RHEL9: Installation and Configuration Guide&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#fail2ban-ssh-protection-on-rhel9-installation-and-configuration-guide&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Fail2ban is an essential security tool that helps protect your Linux server from brute force attacks and automated bot spam targeting SSH and other services. By monitoring log files and automatically banning IP addresses that show signs of malicious activity, fail2ban acts as an intrusion prevention system that significantly enhances your server&amp;rsquo;s security posture.&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;&#xA;  Installation&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#installation&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Install fail2ban and firewalld integration&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dnf install fail2ban fail2ban-firewalld&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Enable and start the service&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;systemctl enable fail2ban --now&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;basic-configuration&#34;&gt;&#xA;  Basic Configuration&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#basic-configuration&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;1-create-local-configuration-files&#34;&gt;&#xA;  1. Create Local Configuration Files&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#1-create-local-configuration-files&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;Never edit the default configuration files directly. Instead, create local copies that won&amp;rsquo;t be overwritten during updates:&lt;/p&gt;</description>
			</item>
			<item>
				<title>SELinux Troubleshooting</title>
				<link>https://blog.nousiainen.xyz/docs/security/selinux-comprehensive-guide/</link>
				<pubDate>Wed, 23 Jul 2025 10:00:00 +0200</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/security/selinux-comprehensive-guide/</guid>
				<description>&lt;h1 id=&#34;selinux-troubleshooting&#34;&gt;&#xA;  SELinux Troubleshooting&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#selinux-troubleshooting&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a little guide on how to find if SELinux is blocking something and how to add an exception to the policy.&lt;/p&gt;&#xA;&lt;h2 id=&#34;selinux-modes&#34;&gt;&#xA;  SELinux Modes&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#selinux-modes&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;SELinux operates in three modes:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Check SELinux status and mode&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sestatus&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;understanding-the-three-modes&#34;&gt;&#xA;  Understanding the Three Modes&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#understanding-the-three-modes&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Enforcing: SELinux policy is enforced&lt;/li&gt;&#xA;&lt;li&gt;Permissive: SELinux policy violations are logged but not blocked&lt;/li&gt;&#xA;&lt;li&gt;Disabled: SELinux is completely disabled&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;check-if-selinux-is-the-problem&#34;&gt;&#xA;  Check if SELinux is the problem&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#check-if-selinux-is-the-problem&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Temporarily set to permissive mode and test&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;setenforce &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Test your application&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# If it works now, SELinux was blocking it&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;setenforce &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;troubleshooting-workflow&#34;&gt;&#xA;  Troubleshooting Workflow&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#troubleshooting-workflow&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;When an application fails and you are certain that SELinux is blocking it, e.g. you turned SELinux off or into permissive mode and the application worked, you can do the following:&lt;/p&gt;</description>
			</item>
			<item>
				<title>SSH Hardening and Automation User Setup with Ansible</title>
				<link>https://blog.nousiainen.xyz/docs/security/ssh-hardening-ansible/</link>
				<pubDate>Sat, 12 Jul 2025 12:00:00 +0300</pubDate>
				<guid>https://blog.nousiainen.xyz/docs/security/ssh-hardening-ansible/</guid>
				<description>&lt;h1 id=&#34;ssh-hardening-and-automation-user-setup-with-ansible&#34;&gt;&#xA;  SSH Hardening and Automation User Setup with Ansible&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#ssh-hardening-and-automation-user-setup-with-ansible&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a little post about how I do SSH hardening for my RHEL9 homelab and how I ensure that the Ansible automation user is properly set. The playbook stems from an incident I had in Red Hat Insights where it was reported that I had an SSH configuration that allowed legacy ciphers. It was also adviced to create a crypto policy that disables weak algorithms.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
