<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ubuntu on Servicios Rogeliowar</title><link>https://blog.serviciosrogeliowar.com/en/tags/ubuntu/</link><description>Recent content in Ubuntu on Servicios Rogeliowar</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Rogelio Guerra Riverón</copyright><lastBuildDate>Thu, 30 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.serviciosrogeliowar.com/en/tags/ubuntu/index.xml" rel="self" type="application/rss+xml"/><item><title>Fail2ban to protect SSH and Nginx: practical configuration on Ubuntu</title><link>https://blog.serviciosrogeliowar.com/en/posts/fail2ban-para-proteger-ssh-y-nginx-configuracion-practica-en-ubuntu/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/fail2ban-para-proteger-ssh-y-nginx-configuracion-practica-en-ubuntu/</guid><description>&lt;h2 class="relative group"&gt;The Problem: Brute Force Attacks
 &lt;div id="the-problem-brute-force-attacks" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-problem-brute-force-attacks" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;After exposing my Ubuntu server to the internet, I spent a night reviewing logs. SSH received failed login attempts every second. Nginx also had suspicious requests to common routes. I needed something to block these attempts automatically. Fail2ban was my solution.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Installation
 &lt;div id="installation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#installation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt install fail2ban
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl start fail2ban
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl enable fail2ban&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Verify that it&amp;rsquo;s running:&lt;/p&gt;</description></item><item><title>SSH authentication by public key: disable passwords on Ubuntu Server</title><link>https://blog.serviciosrogeliowar.com/en/posts/autenticacion-ssh-por-clave-publica-desactivar-contrasenas-en-ubuntu-server/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/autenticacion-ssh-por-clave-publica-desactivar-contrasenas-en-ubuntu-server/</guid><description>&lt;h2 class="relative group"&gt;Why Switch to Key-Based Authentication
 &lt;div id="why-switch-to-key-based-authentication" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-switch-to-key-based-authentication" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;After months of maintaining a home server with open SSH access, I got tired of brute force password attacks. Switching to public key authentication was the best security decision I made. Keys are mathematically impossible to crack through brute force, while passwords are always a target.&lt;/p&gt;

&lt;h2 class="relative group"&gt;SSH Key Generation
 &lt;div id="ssh-key-generation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#ssh-key-generation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;First, generate a key pair on your local machine (not on the server):&lt;/p&gt;</description></item></channel></rss>