{"id":15186,"date":"2024-10-15T11:50:42","date_gmt":"2024-10-15T11:50:42","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=15186"},"modified":"2024-10-16T04:14:46","modified_gmt":"2024-10-16T04:14:46","password":"","slug":"how-to-secure-a-linux-server-with-fail2ban","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/","title":{"rendered":"How to Secure a Linux Server with Fail2Ban"},"content":{"rendered":"\n<p><strong>Fail2Ban<\/strong> is a security tool that helps protect Linux servers from brute-force attacks by monitoring logs and banning IP addresses that show signs of malicious activity. This guide explains how to install, configure, and use Fail2Ban to enhance the security of your Linux server<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Prerequisites:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <strong>Linux server<\/strong> running a supported distribution (Ubuntu, Debian, CentOS, etc.).<\/li>\n\n\n\n<li><strong>Root<\/strong> or <strong>sudo<\/strong> access to the server.<\/li>\n\n\n\n<li>A basic understanding of SSH and command-line operations.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 1: Install Fail2Ban<\/strong><\/h4>\n\n\n\n<p><strong>For Debian\/Ubuntu-based distributions:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Update the package list. It is always a good practise<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update &amp;&amp; sudo apt-get upgrade -y<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Fail2Ban using the command below:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install fail2ban -y<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you want to add email support for the Fail2Ban service, insert the following command and press&nbsp;<strong>Enter<\/strong>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install sendmail<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify Fail2Ban status using the following command:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status fail2ban<\/code><\/pre>\n\n\n\n<p><strong>For RHEL\/Alalinux\/CentOS-based distributions:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First Enable EPEL repository (if not already enabled):<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install epel-release*<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Fail2Ban:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install fail2ban -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"290\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-1024x290.png\" alt=\"\" class=\"wp-image-15225\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-1024x290.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-300x85.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-768x218.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334.png 1245w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable and Start Fail2Ban using these commands:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable fail2ban\n\nsudo systemctl start fail2ban<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"995\" height=\"115\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-332.png\" alt=\"\" class=\"wp-image-15222\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-332.png 995w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-332-300x35.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-332-768x89.png 768w\" sizes=\"auto, (max-width: 995px) 100vw, 995px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"92\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-333.png\" alt=\"\" class=\"wp-image-15224\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-333.png 894w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-333-300x31.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-333-768x79.png 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check Fail2Ban status using these command<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status fail2ban<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"944\" height=\"307\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-335.png\" alt=\"\" class=\"wp-image-15228\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-335.png 944w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-335-300x98.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-335-768x250.png 768w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 2: Configure Fail2Ban<\/strong><\/h4>\n\n\n\n<p>There are two files that can be modified when configuring Fail2Ban<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>jail.loca<\/strong>l &#8211; The original file is called  <strong>jail<\/strong>.<strong>conf<\/strong> and it has&nbsp;<strong>jails<\/strong>&nbsp;\u2013 filters with actions. However, users <em>shouldn\u2019t<\/em> directly modify this file as it contains the basic rule set for Fail2Ban\u2019s software. Instead, you create <strong>jail.local<\/strong> for modifications<\/li>\n\n\n\n<li><strong>fail2ban.local<\/strong> &#8211; &nbsp;The original file is called <strong>fail2ban<\/strong>.<strong>conf<\/strong> and it houses Fail2Ban\u2019s basic configuration. It contains the global settings that<em> should not<\/em> be modified. Instead, you create <strong>fail2ban.local<\/strong> for modifications<\/li>\n<\/ul>\n\n\n\n<p><strong>Setting Up the jail.local Configuration File<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You need to make a copy of the original  <strong>jail<\/strong>.<strong>conf<\/strong> file and name it&nbsp;<strong>jail.local<\/strong>. On this file it, you\u2019ll be able to customize and setup filters and actions, such as&nbsp;<strong>ignoreip<\/strong>,&nbsp;<strong>bantime<\/strong>,&nbsp;<strong>findtime<\/strong>,&nbsp;<strong>maxretry<\/strong>, and&nbsp;<strong>backend<\/strong>.<\/li>\n\n\n\n<li>Use the command below to make a copy of jail.conf and name it jail.local<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo cp \/etc\/fail2ban\/jail.conf \/etc\/fail2ban\/jail.local<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the local configuration file for editing:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/etc\/fail2ban\/jail.local<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can refer to <strong><a href=\"https:\/\/truehost.com\/support\/knowledge-base\/fail2ban-configuration-documentation-jail-local-and-fail2ban-local\/\" target=\"_blank\" rel=\"noreferrer noopener\">this documentation<\/a><\/strong> to see possible configuration options for this section.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Basic settings<\/strong>: In the <code><strong>jail.local<\/strong><\/code> file, you can configure basic parameters:\n<ul class=\"wp-block-list\">\n<li><code><strong>bantime<\/strong><\/code>: How long the IP will be banned after failed authentication (e.g., 600s = 10 minutes).<\/li>\n\n\n\n<li><code><strong>findtime<\/strong><\/code>: The time window during which a certain number of failures must occur to trigger a ban.<\/li>\n\n\n\n<li><code><strong>maxretry<\/strong><\/code>: The number of failed attempts before a ban is triggered.<\/li>\n\n\n\n<li><code><strong>backend<\/strong><\/code>: allows you to specify the backend configuration for file modification. The default value is&nbsp;<strong>auto<\/strong>, but if you use CentOS or Fedora, it needs to be&nbsp;<strong>systemd<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Example configuration:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>bantime = 10m<br>findtime = 10m<br>maxretry = 5<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Configure SSH protection<\/strong><\/li>\n\n\n\n<li>Fail2Ban has a built-in SSH protection jail. To enable it, scroll to the <code>[ssh]<\/code> section and ensure that enabled = true<\/li>\n\n\n\n<li>Below are some of the possible configurations option for this section\n<ul class=\"wp-block-list\">\n<li><strong>enabled<\/strong> &#8211; Enables or disables the jail. Options are <code>true<\/code> or <code>false<\/code><\/li>\n\n\n\n<li><strong>banaction<\/strong>&nbsp;\u2013 defines which default action to use when the&nbsp;<strong>maxretry<\/strong>&nbsp;threshold is reached. If you use&nbsp;<strong>firewalld<\/strong>, set the value to&nbsp;<strong>firewallcmd-ipset<\/strong>. However, if you\u2019ve set up UFW as your firewall, change it to&nbsp;<strong>ufw<\/strong>.<\/li>\n\n\n\n<li><strong>banaction_allports<\/strong>&nbsp;\u2013 allows you to label and block IP addresses on every port. If you use&nbsp;<strong>firewalld<\/strong>, set the value to&nbsp;<strong>firewallcmd-ipset<\/strong>.<\/li>\n\n\n\n<li><strong>port<\/strong>&nbsp;\u2013 Specifies the port to monitor for SSH connections. Default is <code>ssh<\/code>, but if your SSH server runs on a non-standard port, you can specify it.<\/li>\n\n\n\n<li><strong>filter<\/strong>&nbsp;\u2013 Points to the filter used by Fail2Ban to detect malicious patterns in logs. For SSH, this is typically set to <code>sshd<\/code>. <\/li>\n\n\n\n<li><strong>logpath<\/strong> &#8211; Specifies the path to the log file where SSH attempts are logged. This is usually <code>\/var\/log\/auth.log<\/code> on Debian\/Ubuntu or <code>\/var\/log\/secure<\/code> on CentOS\/RHEL.<\/li>\n\n\n\n<li><strong>maxretry &#8211; <\/strong>Defines the maximum number of failed attempts before an IP address is banned.<br><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Example configuration:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;sshd]\nenabled = true\nport = 22\nfilter = sshd\nlogpath = \/var\/log\/auth.log\nmaxretry = 5\nfindtime = 10m\nbantime = 1h\nignoreip = 127.0.0.1\/8 192.168.0.1\naction = %(action_)s\nbanaction = iptables-multiport\nprotocol = tcp\n<\/code><\/pre>\n\n\n\n<p><strong>Setting Up the <strong>fail2ban<\/strong>.local Configuration File<\/strong><\/p>\n\n\n\n<p>The&nbsp;<strong>fail2ban.conf<\/strong>&nbsp;file keeps Fail2Ban\u2019s basic configuration. It contains the global settings that should <strong>not<\/strong> be modified. <\/p>\n\n\n\n<p>If you want to make changes you need create another file and name it&nbsp;<strong>fail2ban.local<\/strong> then copy contents of  <strong>fail2ban.conf<\/strong> &nbsp;to it. This overrides the default configuration profile.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the command below to make a copy of fail2ban.conf and name it fail2ban.local <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/etc\/fail2ban\/fail2ban.conf \/etc\/fail2ban\/fail2ban.local<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the local configuration file for editing:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/etc\/fail2ban\/fail2ban.local<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can now edit the values in the file, as desired. Refer to <strong><a href=\"https:\/\/truehost.com\/support\/knowledge-base\/fail2ban-configuration-documentation-jail-local-and-fail2ban-local\/\" target=\"_blank\" rel=\"noreferrer noopener\">this documentation<\/a><\/strong> to see the possible values<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Fail2Ban is a security tool that helps protect Linux servers from brute-force attacks by monitoring logs and banning IP addresses that show signs of malicious activity. This guide explains how to install, configure, and use Fail2Ban to enhance the security of your Linux server Prerequisites: Step 1: Install Fail2Ban For Debian\/Ubuntu-based distributions: For RHEL\/Alalinux\/CentOS-based distributions: [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1820,1824,1879,2128],"doc_tag":[],"class_list":["post-15186","docs","type-docs","status-publish","hentry","doc_category-cloud-servers-in-kenya","doc_category-dedicated-servers","doc_category-servers","doc_category-vps-servers"],"year_month":"2026-07","word_count":873,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Eugene","author_nicename":"eugene","author_url":"https:\/\/truehost.com\/support\/author\/eugene\/"},"doc_category_info":[{"term_name":"Cloud servers in Kenya","term_url":"https:\/\/truehost.com\/support\/docs-category\/cloud-servers-in-kenya\/"},{"term_name":"dedicated servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/dedicated-servers\/"},{"term_name":"Servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/servers\/"},{"term_name":"VPS-Servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/vps-servers\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Secure a Linux Server with Fail2Ban -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Secure a Linux Server with Fail2Ban -\" \/>\n<meta property=\"og:description\" content=\"Fail2Ban is a security tool that helps protect Linux servers from brute-force attacks by monitoring logs and banning IP addresses that show signs of malicious activity. This guide explains how to install, configure, and use Fail2Ban to enhance the security of your Linux server Prerequisites: Step 1: Install Fail2Ban For Debian\/Ubuntu-based distributions: For RHEL\/Alalinux\/CentOS-based distributions: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-16T04:14:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-1024x290.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/\",\"name\":\"How to Secure a Linux Server with Fail2Ban -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-334-1024x290.png\",\"datePublished\":\"2024-10-15T11:50:42+00:00\",\"dateModified\":\"2024-10-16T04:14:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-334-1024x290.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-334-1024x290.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-secure-a-linux-server-with-fail2ban\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Secure a Linux Server with Fail2Ban\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Secure a Linux Server with Fail2Ban -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/","og_locale":"en_US","og_type":"article","og_title":"How to Secure a Linux Server with Fail2Ban -","og_description":"Fail2Ban is a security tool that helps protect Linux servers from brute-force attacks by monitoring logs and banning IP addresses that show signs of malicious activity. This guide explains how to install, configure, and use Fail2Ban to enhance the security of your Linux server Prerequisites: Step 1: Install Fail2Ban For Debian\/Ubuntu-based distributions: For RHEL\/Alalinux\/CentOS-based distributions: [&hellip;]","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/","article_modified_time":"2024-10-16T04:14:46+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-1024x290.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/","name":"How to Secure a Linux Server with Fail2Ban -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-1024x290.png","datePublished":"2024-10-15T11:50:42+00:00","dateModified":"2024-10-16T04:14:46+00:00","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-1024x290.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-334-1024x290.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-secure-a-linux-server-with-fail2ban\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Secure a Linux Server with Fail2Ban"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/15186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=15186"}],"version-history":[{"count":10,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/15186\/revisions"}],"predecessor-version":[{"id":15233,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/15186\/revisions\/15233"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=15186"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=15186"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=15186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}