<?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: HPanel</title>
    <description>The latest articles on DEV Community by HPanel (@hpanel).</description>
    <link>https://dev.to/hpanel</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%2F4209320%2F23adf69e-e535-465d-874b-168435fead7b.jpg</url>
      <title>DEV Community: HPanel</title>
      <link>https://dev.to/hpanel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hpanel"/>
    <language>en</language>
    <item>
      <title>Linux Web Hosting Server Hardening: Malware Scanning, Fail2Ban, ModSecurity WAF and IP Blocking</title>
      <dc:creator>HPanel</dc:creator>
      <pubDate>Mon, 26 Oct 2026 18:30:28 +0000</pubDate>
      <link>https://dev.to/hpanel/linux-web-hosting-server-hardening-malware-scanning-fail2ban-modsecurity-waf-and-ip-blocking-51d8</link>
      <guid>https://dev.to/hpanel/linux-web-hosting-server-hardening-malware-scanning-fail2ban-modsecurity-waf-and-ip-blocking-51d8</guid>
      <description>&lt;p&gt;A web hosting server is hard to secure for a simple reason: &lt;strong&gt;you don't control most of the code running on it.&lt;/strong&gt; Every customer brings their own WordPress plugins, upload forms, outdated themes and weak passwords. A single compromised site can turn into a spam relay, a crypto miner or a phishing host, and the server's IP reputation takes the hit for everyone.&lt;/p&gt;

&lt;p&gt;This guide covers the layers that matter most on a shared Linux hosting server, in the order an attack usually reaches them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Network edge&lt;/strong&gt;: blocking known-bad sources (IP and CIDR blocking).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt;: stopping brute force on SSH, FTP and mail (Fail2Ban).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application layer&lt;/strong&gt;: filtering malicious HTTP requests (ModSecurity WAF with the OWASP Core Rule Set).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filesystem&lt;/strong&gt;: catching malware the moment it lands (real-time scanning and quarantine).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Containment&lt;/strong&gt;: making sure one compromised account can't reach the others (isolation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transport and mail trust&lt;/strong&gt;: SSL everywhere, plus SPF, DKIM and DMARC.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For each layer I'll explain what it does and how to set it up by hand on a generic server, then show how it looks when it's built into a hosting control panel. My examples use &lt;strong&gt;HPanel&lt;/strong&gt;, the self-hosted control panel I work on, because it ships all of these layers by default. The principles apply anywhere.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclosure:&lt;/strong&gt; I'm on the HPanel team. HPanel feature details come from the public &lt;a href="https://hpanel.net/features.php" rel="noopener noreferrer"&gt;features page&lt;/a&gt;. Generic commands are standard Linux tooling.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Layer 0: The boring basics (do these first)
&lt;/h2&gt;

&lt;p&gt;None of the layers below help if the foundation is weak. Before anything else:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Patch regularly.&lt;/strong&gt; Apply OS security updates on a schedule (&lt;code&gt;unattended-upgrades&lt;/code&gt; on Ubuntu is a reasonable default).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use SSH keys for root and admin access&lt;/strong&gt;, and disable password logins where you can (&lt;code&gt;PasswordAuthentication no&lt;/code&gt; in &lt;code&gt;sshd_config&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Close what you don't use.&lt;/strong&gt; A default-deny host firewall (&lt;code&gt;ufw default deny incoming&lt;/code&gt;) with explicit allows for web, mail, DNS and panel ports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate admin and customer access.&lt;/strong&gt; Customers should never need root.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep backups off the server.&lt;/strong&gt; Ransomware and &lt;code&gt;rm -rf&lt;/code&gt; mistakes both hit local backups too.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that in place, let's go layer by layer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 1: IP and CIDR blocking
&lt;/h2&gt;

&lt;p&gt;Sometimes the right answer is simply "never talk to this address again": a scanner hammering &lt;code&gt;/wp-login.php&lt;/code&gt;, a botnet range, or a source behind a burst of abuse reports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By hand&lt;/strong&gt;, that means firewall rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# block a single IP&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw deny from 203.0.113.45
&lt;span class="c"&gt;# block a whole range (CIDR)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw deny from 198.51.100.0/24
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That works, but on a hosting server it gets messy quickly. Who added which rule and why? Can customers block abusers on their own sites without root access? Do you need to reload anything?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In a control panel&lt;/strong&gt;, IP blocking should work at two levels: &lt;strong&gt;server-wide&lt;/strong&gt; (admin) and &lt;strong&gt;per account&lt;/strong&gt; (customer). In HPanel, the IP Blocker accepts single IPs, ranges and CIDR blocks, works both per account and server-wide, and takes effect instantly with no server restart.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmystisfskme3uxvzq7r5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmystisfskme3uxvzq7r5.png" alt="HPanel IP Blocker in the user panel" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Customers can block single IPs, ranges or CIDR blocks for their own sites.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; blocking is a blunt tool. Use it for persistent sources, and let Fail2Ban (below) handle the dynamic, behaviour-based bans.&lt;/p&gt;


&lt;h2&gt;
  
  
  Layer 2: Brute-force protection with Fail2Ban
&lt;/h2&gt;

&lt;p&gt;On any internet-facing server, SSH, FTP and mail logins are attacked around the clock. Fail2Ban watches authentication logs and temporarily bans IPs that fail too many times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By hand&lt;/strong&gt;, a minimal &lt;code&gt;jail.local&lt;/code&gt; looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[DEFAULT]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;bantime&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;1h&lt;/span&gt;
&lt;span class="py"&gt;findtime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;10m&lt;/span&gt;
&lt;span class="py"&gt;maxretry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;5&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[sshd]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;enabled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[postfix]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;enabled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[dovecot]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;enabled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[vsftpd]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;enabled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart fail2ban
&lt;span class="nb"&gt;sudo &lt;/span&gt;fail2ban-client status
&lt;span class="nb"&gt;sudo &lt;/span&gt;fail2ban-client status sshd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What matters on a &lt;strong&gt;hosting&lt;/strong&gt; server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cover every authentication surface&lt;/strong&gt;, not just SSH. Mail (Postfix and Dovecot) and FTP are attacked just as often, and a cracked mailbox becomes a spam source within minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch the activity.&lt;/strong&gt; A sudden spike in bans on one jail is an early warning sign.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't lock yourself out.&lt;/strong&gt; Add your own office or VPN IP to &lt;code&gt;ignoreip&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In HPanel&lt;/strong&gt;, Fail2Ban is installed and configured during setup with &lt;strong&gt;separate jails for SSH, FTP, mail (Postfix/Dovecot) and web services&lt;/strong&gt;. The admin panel adds a &lt;strong&gt;live activity feed&lt;/strong&gt; of banned IPs, failed login attempts and blocked attacks, with severity levels (Critical, High, Medium) and configurable ban durations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5y5lq4ry451sy6k0oe6k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5y5lq4ry451sy6k0oe6k.png" alt="HPanel security and malware scanner dashboard" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;HPanel's security dashboard: ClamAV and Fail2Ban status, per-jail counters and live ban activity.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 3: A web application firewall (ModSecurity + OWASP CRS)
&lt;/h2&gt;

&lt;p&gt;Most hosting compromises don't come through SSH. They come through &lt;strong&gt;HTTP&lt;/strong&gt;: SQL injection in an old plugin, a file-inclusion bug in a theme, an XSS payload in a contact form. A WAF inspects requests before they reach PHP and blocks the ones that match known attack patterns.&lt;/p&gt;

&lt;p&gt;The usual open-source stack is &lt;strong&gt;ModSecurity&lt;/strong&gt; with the &lt;strong&gt;OWASP Core Rule Set (CRS)&lt;/strong&gt;, which covers SQL injection, XSS, local/remote file inclusion (LFI/RFI) and other OWASP Top 10 classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By hand on Nginx&lt;/strong&gt;, you build or install the ModSecurity connector module, download CRS, include it in your config, and then spend time tuning false positives. Expect some: CRS will occasionally flag a legitimate admin form or API payload. The standard workflow is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start in &lt;strong&gt;detection-only&lt;/strong&gt; mode (&lt;code&gt;SecRuleEngine DetectionOnly&lt;/code&gt;) and read the audit log.&lt;/li&gt;
&lt;li&gt;Add targeted exclusions for known-good paths.&lt;/li&gt;
&lt;li&gt;Switch to &lt;strong&gt;blocking&lt;/strong&gt; (&lt;code&gt;SecRuleEngine On&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Keep a &lt;strong&gt;per-site off switch&lt;/strong&gt; for emergencies.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That last point is why per-domain control matters on a shared server. One customer's custom app shouldn't force you to weaken the rules for everyone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In HPanel&lt;/strong&gt;, the ModSecurity WAF ships with the OWASP Core Rule Set and offers a &lt;strong&gt;per-domain toggle, blocked-request logs and IP whitelisting&lt;/strong&gt; from the admin dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft6jw9j04g8dbtrakho0h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft6jw9j04g8dbtrakho0h.png" alt="HPanel ModSecurity WAF settings" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;ModSecurity WAF settings in the HPanel admin panel.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 4: Real-time malware scanning and quarantine
&lt;/h2&gt;

&lt;p&gt;Even with a WAF, something will eventually land on disk: a webshell uploaded through a vulnerable form, a backdoored "nulled" plugin, or a crypto miner dropped by a compromised account. The question is &lt;strong&gt;how fast you notice&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A nightly &lt;code&gt;clamscan&lt;/code&gt; cron job is better than nothing, but it gives an attacker up to 24 hours. On a hosting server you want scanning to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On upload&lt;/strong&gt;: scan files as they arrive through the file manager or FTP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous&lt;/strong&gt;: watch the filesystem for new and modified files across all accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic on detection&lt;/strong&gt;: quarantine or delete instead of just emailing a report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auditable&lt;/strong&gt;: scan history, per-user reports and a timeline of what was found when.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;By hand&lt;/strong&gt;, you can get part of the way with &lt;code&gt;clamd&lt;/code&gt; plus &lt;code&gt;clamonacc&lt;/code&gt; (on-access scanning) or an inotify-based watcher, along with scripts for quarantine and reporting. It's doable, but there are a lot of moving parts to maintain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In HPanel&lt;/strong&gt;, the malware system includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time upload scanning&lt;/strong&gt; of every file uploaded via the file manager or FTP, using custom pattern detection plus an asynchronous ClamAV deep scan,&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;filesystem watcher&lt;/strong&gt; that detects new and modified files across all hosting accounts,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ClamAV&lt;/strong&gt; with automatic signature updates, plus &lt;strong&gt;HPanel's own malware signature engine&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;auto-quarantine&lt;/strong&gt; of detected threats such as backdoors, webshells and crypto miners,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;per-user and full-server scans&lt;/strong&gt; on demand, with reports, scan history and an infection timeline.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Layer 5: Containment, so one bad account stays one bad account
&lt;/h2&gt;

&lt;p&gt;Assume a site &lt;em&gt;will&lt;/em&gt; get compromised eventually. What matters then is the &lt;strong&gt;blast radius&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On a shared hosting server, containment means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Filesystem isolation.&lt;/strong&gt; A compromised account can't read other users' files, system binaries or server configs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate PHP pools.&lt;/strong&gt; Each account runs PHP under its own user, so a webshell runs with that account's permissions only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource limits.&lt;/strong&gt; A crypto miner or fork bomb can't take the whole server down.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HPanel handles this with a &lt;strong&gt;CageFS-style chroot filesystem jail&lt;/strong&gt; (users can't see other users' files or server configs), &lt;strong&gt;per-account PHP-FPM pools&lt;/strong&gt;, and &lt;strong&gt;Linux cgroups limits&lt;/strong&gt; on CPU, RAM, IO and process count per account. A runaway process hits its own ceiling instead of the server's.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftdph5qxdrl2bmn1d3r47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftdph5qxdrl2bmn1d3r47.png" alt="PHP Manager in the HPanel user panel" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Each account runs its own PHP version and its own PHP-FPM pool.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 6: SSL everywhere, and mail that other servers trust
&lt;/h2&gt;

&lt;p&gt;Two last layers protect your customers' visitors and your server's reputation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSL.&lt;/strong&gt; Every site should be HTTPS, with certificates that renew themselves. Expired certificates are the most common avoidable outage in hosting. HPanel issues and renews &lt;strong&gt;Let's Encrypt&lt;/strong&gt; certificates automatically for every domain, with wildcard support and certificate status monitoring.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frhlssqd2pqyl17ua28vg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frhlssqd2pqyl17ua28vg.png" alt="SSL certificates in the HPanel user panel" width="" height=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Auto-issued, auto-renewed Let's Encrypt certificates per domain.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mail authentication.&lt;/strong&gt; SPF, DKIM and DMARC tell other mail servers which hosts may send for a domain and let them verify the signature. Without them, your customers' legitimate mail lands in spam, and spoofed mail is easier to send in their name. In HPanel, &lt;strong&gt;DKIM keys and DNS records are generated automatically when an account is created&lt;/strong&gt;, and SpamAssassin filters incoming mail.&lt;/p&gt;




&lt;h2&gt;
  
  
  Common hardening mistakes on hosting servers
&lt;/h2&gt;

&lt;p&gt;A few patterns come up again and again when a hosting server gets into trouble:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scanning only at night.&lt;/strong&gt; By the time a nightly scan finds a webshell, it has often already been used to send spam or plant more backdoors. Scanning on upload, plus a filesystem watcher, closes most of that window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protecting SSH but not mail.&lt;/strong&gt; Mail logins are attacked just as often as SSH, and a compromised mailbox damages your IP reputation faster than almost anything else. Give Postfix and Dovecot their own jails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turning the WAF off server-wide after one false positive.&lt;/strong&gt; One customer's admin form trips a rule, the WAF gets disabled for everyone, and nobody turns it back on. Use per-domain exceptions instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One shared PHP user for every site.&lt;/strong&gt; If every site runs PHP as the same user, a single compromised plugin can read every other site's &lt;code&gt;wp-config.php&lt;/code&gt;. Per-account PHP-FPM pools and a filesystem jail prevent that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No limits.&lt;/strong&gt; Without per-account CPU, memory and process limits, a crypto miner is a server-wide outage, not a single-account incident.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security that depends on paid add-ons nobody renewed.&lt;/strong&gt; If a protection layer is an optional extra, sooner or later one server won't have it. Built-in defaults are easier to keep consistent across a fleet.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A hardening checklist you can copy
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Basics&lt;/td&gt;
&lt;td&gt;OS patched on a schedule; SSH keys only; default-deny firewall; off-server backups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IP blocking&lt;/td&gt;
&lt;td&gt;Server-wide and per-account blocks; CIDR support; documented reasons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brute force&lt;/td&gt;
&lt;td&gt;Fail2Ban jails for SSH, FTP, Postfix, Dovecot and web; your own IPs whitelisted; activity reviewed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WAF&lt;/td&gt;
&lt;td&gt;ModSecurity + OWASP CRS; tuned in detection mode first; per-domain toggle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Malware&lt;/td&gt;
&lt;td&gt;Upload scanning + filesystem watcher; auto-quarantine; signatures auto-updated; scan history&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Containment&lt;/td&gt;
&lt;td&gt;Filesystem jail; per-account PHP-FPM; cgroups CPU/RAM/IO/process limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SSL&lt;/td&gt;
&lt;td&gt;Auto-issue and auto-renew for every domain; expiry monitoring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mail&lt;/td&gt;
&lt;td&gt;SPF, DKIM and DMARC for every domain; spam filtering&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Hardening a hosting server isn't one tool. It's a set of layers, each catching what the previous one missed: block what you know is bad, rate-limit authentication, filter HTTP, scan the disk continuously, contain the damage, and keep SSL and mail authentication automatic.&lt;/p&gt;

&lt;p&gt;You can build every layer yourself, and on a single personal server that's a great way to learn. On a server with dozens or hundreds of customer accounts, though, you want these layers on by default and visible in one dashboard. That's what we built into &lt;a href="https://hpanel.net/" rel="noopener noreferrer"&gt;HPanel&lt;/a&gt;: malware scanning, Fail2Ban, ModSecurity, IP blocking, isolation and auto-SSL are included in every plan, with &lt;strong&gt;one flat license per server and no per-account fees&lt;/strong&gt;. Setup steps are in the &lt;a href="https://hpanel.net/docs.php" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want these protections on your own server? &lt;a href="https://hpanel.net/pricing.php" rel="noopener noreferrer"&gt;Buy now&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>linux</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
