<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Seguridad on Servicios Rogeliowar</title><link>https://blog.serviciosrogeliowar.com/en/tags/seguridad/</link><description>Recent content in Seguridad on Servicios Rogeliowar</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Rogelio Guerra Riverón</copyright><lastBuildDate>Fri, 22 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.serviciosrogeliowar.com/en/tags/seguridad/index.xml" rel="self" type="application/rss+xml"/><item><title>Wazuh SIEM with Docker: complete deployment with SSL and compliance rules</title><link>https://blog.serviciosrogeliowar.com/en/posts/wazuh-siem-docker-ssl-cumplimiento/</link><pubDate>Fri, 22 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/wazuh-siem-docker-ssl-cumplimiento/</guid><description>&lt;h2 class="relative group"&gt;What is ENS and Why It Matters
 &lt;div id="what-is-ens-and-why-it-matters" 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="#what-is-ens-and-why-it-matters" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;&lt;a href="https://ens.ccn.cni.es/" target="_blank" rel="noreferrer"&gt;National Security Framework (ENS)&lt;/a&gt;&lt;/strong&gt; is the mandatory cybersecurity regulatory framework for Spanish Public Administrations and private companies that provide services to them. It is regulated by the &lt;a href="https://www.boe.es/eli/es/rd/2022/05/03/311" target="_blank" rel="noreferrer"&gt;Royal Decree 311/2022&lt;/a&gt; and establishes the principles, requirements, and security measures that must be applied to information systems that handle public data or services.&lt;/p&gt;</description></item><item><title>Connect your mobile to SSH from anywhere with WireGuard and Termius</title><link>https://blog.serviciosrogeliowar.com/en/posts/conectar-el-movil-a-ssh-desde-cualquier-lugar-con-wireguard-y-termius/</link><pubDate>Tue, 19 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/conectar-el-movil-a-ssh-desde-cualquier-lugar-con-wireguard-y-termius/</guid><description>&lt;h2 class="relative group"&gt;The Problem
 &lt;div id="the-problem" 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" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I needed to access my home server via SSH from my mobile phone without exposing it directly to the internet. The obvious options were bad: opening port 22 to the world is suicidal, and trusting third-party apps with root access didn&amp;rsquo;t convince me. The solution that worked: WireGuard + Termius.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Why This Combination
 &lt;div id="why-this-combination" 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-this-combination" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;WireGuard is lightweight, fast, and consumes little battery on mobile devices. Termius is a polished SSH client that handles private keys well. Together, you have secure access without complications.&lt;/p&gt;</description></item><item><title>How to Clean Up Exposed Credentials in Git with git-filter-repo and Rotate Tokens</title><link>https://blog.serviciosrogeliowar.com/en/posts/como-limpiar-credenciales-expuestas-en-git-con-git-filter-repo-y-rotar-tokens/</link><pubDate>Tue, 19 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/como-limpiar-credenciales-expuestas-en-git-con-git-filter-repo-y-rotar-tokens/</guid><description>&lt;h2 class="relative group"&gt;The Real Problem
 &lt;div id="the-real-problem" 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-real-problem" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I recently realized I had pushed a &lt;code&gt;.env&lt;/code&gt; file with API credentials to a private repository. Even though it was private, that&amp;rsquo;s no excuse. A compromised access, a repository that becomes public, or simply a security audit would have exposed my tokens. I learned that &lt;strong&gt;I can&amp;rsquo;t rely on deleting files in subsequent commits&lt;/strong&gt;—Git keeps all the history.&lt;/p&gt;</description></item><item><title>Restic: encrypted backups with deduplication for your Linux server</title><link>https://blog.serviciosrogeliowar.com/en/posts/restic-backups-cifrados-deduplicacion/</link><pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/restic-backups-cifrados-deduplicacion/</guid><description>&lt;p&gt;I already had &lt;a href="https://blog.serviciosrogeliowar.com/en/posts/backups-automaticos-con-rsync-y-cron-para-docker-domestico/" &gt;backups with rsync and cron&lt;/a&gt;, but rsync copies files, not snapshots. If you accidentally delete a file and the backup syncs before you notice, you lose it. &lt;a href="https://restic.net/" target="_blank" rel="noreferrer"&gt;Restic&lt;/a&gt; solves that and adds something rsync will never provide: &lt;strong&gt;AES-256 encryption, deduplication, and snapshots with navigable history&lt;/strong&gt;.&lt;/p&gt;

&lt;h2 class="relative group"&gt;What makes Restic different
 &lt;div id="what-makes-restic-different" 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="#what-makes-restic-different" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Feature&lt;/th&gt;
					&lt;th&gt;rsync&lt;/th&gt;
					&lt;th&gt;Restic&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;AES-256 encryption&lt;/td&gt;
					&lt;td&gt;No&lt;/td&gt;
					&lt;td&gt;Yes&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Deduplication&lt;/td&gt;
					&lt;td&gt;No&lt;/td&gt;
					&lt;td&gt;Yes (block-level)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Navigable snapshots&lt;/td&gt;
					&lt;td&gt;No&lt;/td&gt;
					&lt;td&gt;Yes&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Multiple backends&lt;/td&gt;
					&lt;td&gt;No&lt;/td&gt;
					&lt;td&gt;SFTP, S3, Backblaze, rclone…&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Integrity checking&lt;/td&gt;
					&lt;td&gt;No&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;restic check&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Retention policy&lt;/td&gt;
					&lt;td&gt;Manual&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;restic forget --prune&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Deduplication is especially useful for database backups and configuration directories that change little: a Restic repository with 6 months of daily backups usually takes up much less space than 180 full copies.&lt;/p&gt;</description></item><item><title>VPN with Wireguard in Docker: Secure access to internal services without exposing ports</title><link>https://blog.serviciosrogeliowar.com/en/posts/vpn-con-wireguard-en-docker-acceso-seguro-a-servicios-internos-sin-exponer-puertos/</link><pubDate>Wed, 06 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/vpn-con-wireguard-en-docker-acceso-seguro-a-servicios-internos-sin-exponer-puertos/</guid><description>&lt;h2 class="relative group"&gt;Why you need this
 &lt;div id="why-you-need-this" 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-you-need-this" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;A few months ago I faced a common problem: I wanted to access my internal services (Jellyfin, Home Assistant, etc.) from outside my home, but I didn&amp;rsquo;t want to expose them directly on the internet. Opening ports is an unnecessary risk. The solution was to set up a VPN with Wireguard in Docker. It was the best decision I made for my home infrastructure.&lt;/p&gt;</description></item><item><title>Hardening Linux servers: practical guide</title><link>https://blog.serviciosrogeliowar.com/en/posts/hardening-servidores-linux/</link><pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/hardening-servidores-linux/</guid><description>&lt;h1 class="relative group"&gt;Server Security Hardening: Essential Steps
 &lt;div id="server-security-hardening-essential-steps" 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="#server-security-hardening-essential-steps" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h1&gt;
&lt;p&gt;Having a server exposed to the Internet without minimal security configuration is leaving the door wide open. In this article, I&amp;rsquo;ve compiled the steps I apply on my own servers to reduce the attack surface without complicating day-to-day management.&lt;/p&gt;

&lt;h2 class="relative group"&gt;SSH: the first line of defense
 &lt;div id="ssh-the-first-line-of-defense" 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-the-first-line-of-defense" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The SSH service is the most attacked entry point on any Linux server. These are the most important settings in &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt;:&lt;/p&gt;</description></item><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>Security email notifications from the terminal with msmtp and Gmail</title><link>https://blog.serviciosrogeliowar.com/en/posts/notificaciones-de-seguridad-por-email-desde-el-terminal-con-msmtp-y-gmail/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/notificaciones-de-seguridad-por-email-desde-el-terminal-con-msmtp-y-gmail/</guid><description>&lt;h2 class="relative group"&gt;Why you need this
 &lt;div id="why-you-need-this" 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-you-need-this" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;When you run a server at home, you need to know if something strange happens. A script that sends you an email when it detects a failed login attempt, an expiring certificate, or a nearly full disk is invaluable. The problem is that your ISP blocks port 25, so you can&amp;rsquo;t use sendmail directly. That&amp;rsquo;s where msmtp comes in.&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><item><title>WireGuard VPN: Access your home server from anywhere</title><link>https://blog.serviciosrogeliowar.com/en/posts/wireguard-vpn-servidor-dom%C3%A9stico/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/wireguard-vpn-servidor-dom%C3%A9stico/</guid><description>&lt;p&gt;One of the classic problems with having a server at home is secure remote access. Opening SSH ports directly to the world is a bad idea — you see it in the auth logs: hundreds of attempts per day. The elegant solution is a VPN, and &lt;a href="https://www.wireguard.com/" target="_blank" rel="noreferrer"&gt;WireGuard&lt;/a&gt; is today&amp;rsquo;s best available option.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Why WireGuard?
 &lt;div id="why-wireguard" 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-wireguard" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Compared to &lt;a href="https://openvpn.net/" target="_blank" rel="noreferrer"&gt;OpenVPN&lt;/a&gt; or IPSec:&lt;/p&gt;</description></item></channel></rss>