{"id":48325,"date":"2019-10-09T08:50:26","date_gmt":"2019-10-09T12:50:26","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=48325"},"modified":"2026-11-11T14:21:36","modified_gmt":"2026-11-11T19:21:36","slug":"ways-to-harden-your-vps-hosting","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/","title":{"rendered":"How to Secure a VPS: Server Hardening Best Practices"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-1024x538.png\" alt=\"How to Secure a VPS: Server Hardening Best Practices hero image\" class=\"wp-image-900822\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-1536x807.png 1536w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-2048x1076.png 2048w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A VPS gives you root access. That also makes you the one who closes open ports and patches forgotten services. This guide shows how to <strong>secure a VPS<\/strong> in six tiers: access, exposure, updates, attack blocking, detection, and recovery. Work through them in order, then reuse the checklist at the end for every server. Commands assume AlmaLinux with cPanel and WHM, and the principles apply to Ubuntu on a Self-Managed VPS too.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Who Owns VPS Security: Managed or Self-Managed<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One question matters more than any setting here: who owns each task on your plan? With a <a href=\"https:\/\/www.inmotionhosting.com\/managed-vps-hosting\">Managed VPS<\/a>, the InMotion Hosting team handles operating system patching, control panel security updates, and daily automatic backups. You work in cPanel. You still own your apps, users, and credentials. Root access is available through the Account Management Panel (AMP) after you accept a short agreement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With a <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">Self-Managed VPS<\/a>, you have full root access and full responsibility for the operating system, software, and security. You handle operating system updates, security patching, software setup, firewall rules, backups, and app troubleshooting. InMotion Hosting handles the physical server, the network, and the data center. It also provides distributed denial of service (DDoS) protection at the edge.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If nobody on your team owns that work, a managed plan is the safer choice. The blog post <a href=\"https:\/\/www.inmotionhosting.com\/blog\/managed-vps-vs-unmanaged-vps-hosting\/\">Managed VPS vs Unmanaged VPS Hosting<\/a> compares the two in more detail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Know which plan you have before you assume something is handled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Control Who Can Reach the Server<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Use SSH keys and turn off password authentication<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Keys end brute force attacks (endless password guessing) because there is no password to guess. Create an ed25519 key on your own computer. Install the public key on the server, then confirm you can log in with it. Only then turn off password logins. For a full walkthrough, see <a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-generate-ssh-keys\/\">How to Generate SSH Keys<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list article_list\">\n<li>Generate the key pair on your computer:<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ssh-keygen<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-t<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ed25519<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"2\" class=\"wp-block-list article_list\">\n<li>Copy the public key to the server. Replace <code>&lt;your-user&gt;<\/code> and <code>&lt;server-ip&gt;<\/code> with your own values:<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">ssh-copy-id<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #9ECBFF\">your-use<\/span><span style=\"color: #E1E4E8\">r<\/span><span style=\"color: #F97583\">&gt;<\/span><span style=\"color: #9ECBFF\">@<\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #9ECBFF\">server-i<\/span><span style=\"color: #E1E4E8\">p<\/span><span style=\"color: #F97583\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"3\" class=\"wp-block-list article_list\">\n<li>Open a second terminal and log in with the key. Keep your first session open until this works.<\/li>\n\n\n\n<li>Confirm that your non-root account can become root. On cPanel servers, add it in WHM under <strong>Security Center<\/strong> &gt; <strong>Manage Wheel Group Users<\/strong> so it can run <code>su<\/code>. That interface does not grant <code>sudo<\/code>. Otherwise you lock yourself out when you disable root login.<\/li>\n\n\n\n<li>Open <code>\/etc\/ssh\/sshd_config<\/code> and set <code>PasswordAuthentication no<\/code> and <code>PermitRootLogin no<\/code>. Check the files in <code>\/etc\/ssh\/sshd_config.d\/<\/code> too, because sshd uses the first value it reads.<\/li>\n\n\n\n<li>Test the configuration for typos:<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">sshd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-t<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"7\" class=\"wp-block-list article_list\">\n<li>Restart the SSH service (the service is named <code>ssh<\/code> on Ubuntu):<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">restart<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">sshd<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"602\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/cpanel-ssh-keys-1024x602.jpg\" alt=\"cPanel SSH keys management interface\" class=\"wp-image-100899\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/cpanel-ssh-keys-1024x602.jpg 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/cpanel-ssh-keys-300x176.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/cpanel-ssh-keys-768x451.jpg 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/cpanel-ssh-keys.jpg 1115w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To generate or import keys for a cPanel account, go to <strong>Security<\/strong> &gt; <strong>SSH Access<\/strong> &gt; <strong>Manage SSH Keys<\/strong> in cPanel.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Restrict control panel and SSH access to known addresses<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WHM and cPanel service ports are a standing target. When a critical control panel flaw is disclosed, unrestricted access turns a patch window into an incident. InMotion Hosting wrote about this in its <a href=\"https:\/\/www.inmotionhosting.com\/blog\/web-hosting-security-zero-day-response\/\">zero-day response<\/a> (CVE-2026-41940). Limit ports 2083 and 2087 to your office or virtual private network (VPN) addresses where your workflow allows. Do the same for SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Moving SSH off port 22 only quiets scanning noise in your logs. It is not protection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Turn on two-factor authentication<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WHM and cPanel both support two-factor authentication. Turn it on for every account with admin access, including yours.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In WHM, go to <strong>Security Center<\/strong> &gt; <strong>Two-Factor Authentication<\/strong>. Turn on the security policy first, or cPanel users cannot set it up. Then add your own login under <strong>Manage My Account<\/strong>.<\/li>\n\n\n\n<li>In cPanel, go to <strong>Security<\/strong> &gt; <strong>Two-Factor Authentication<\/strong>. See <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/cpanel-two-factor-authentication\/\">cPanel Two-Factor Authentication<\/a>.<\/li>\n\n\n\n<li>For your InMotion Hosting account, turn it on in AMP under <strong>Login &amp; Security<\/strong>. See <a href=\"https:\/\/www.inmotionhosting.com\/support\/amp\/amp-security-how-to-enable-two-factor-authentication\/\">AMP two-factor authentication<\/a>.<\/li>\n<\/ul>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>Note:<\/strong> Two-factor authentication in AMP protects your AMP login only. It does not protect WHM, cPanel, or SSH. Turn it on in WHM and cPanel as well.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Set a password policy that matches current guidance<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Length beats complexity. Current <a href=\"https:\/\/pages.nist.gov\/800-63-4\/sp800-63b\/authenticators\/\">NIST digital identity guidance (SP 800-63B-4)<\/a> covers this. It requires a minimum of 15 characters when a password is the only authentication factor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It says not to impose composition rules or periodic password changes, but to force a change on evidence of compromise. It also calls for checking new passwords against a blocklist of common, expected, or compromised passwords.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If an older policy set a 30-day maximum password age, it conflicts with that guidance. To remove the limit for one account, run this command and replace <code>&lt;username&gt;<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">chage<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-M<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-1<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #9ECBFF\">usernam<\/span><span style=\"color: #E1E4E8\">e<\/span><span style=\"color: #F97583\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Review accounts and remove the ones nobody owns<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">List the accounts that exist:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">getent<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">passwd<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Give each person the least access their work requires. Audit accounts every quarter. Look for former contractors, past agencies, and service accounts from retired apps. Each one is a login nobody watches.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reduce What the Server Exposes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Run a firewall and verify it is updating<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A firewall blocks port scans, brute force attempts, and traffic to services you never meant to expose.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Every Managed VPS from InMotion Hosting ships with ConfigServer Security and Firewall (CSF) installed. On a Self-Managed VPS, you install it yourself. Its original vendor shut down on August 31, 2025. cPanel now maintains a fork, a continued copy of the code, at <a href=\"https:\/\/github.com\/cpanel\/cpanel-csf\">github.com\/cpanel\/cpanel-csf<\/a>. cPanel\u2019s version ships as the <code>cpanel-csf<\/code> package and updates through the system package manager, not the old built-in auto-update. A server still on the original vendor\u2019s release gets no more security patches.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check which version you run. cPanel\u2019s releases start at version 16.00. The <a href=\"https:\/\/www.inmotionhosting.com\/support\/security\/install-csf\/\">Install CSF<\/a> article covers a Self-Managed install. These commands are the ones you will use most.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">csf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-v<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">csf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-a<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">192.0<\/span><span style=\"color: #9ECBFF\">.2.10<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">csf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">192.0<\/span><span style=\"color: #9ECBFF\">.2.10<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">csf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-td<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">192.0<\/span><span style=\"color: #9ECBFF\">.2.10<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">3600<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">csf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-dr<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">192.0<\/span><span style=\"color: #9ECBFF\">.2.10<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">In order, these commands show the installed version, allow an IP address, and block one. The last two block an address for 3600 seconds and remove a permanent block. Replace <code>192.0.2.10<\/code>, a documentation example, with the real address. More commands are in <a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/basic-csf-commands\/\">Basic CSF Commands<\/a> and <a href=\"https:\/\/www.inmotionhosting.com\/support\/security\/server-security-block-ports-csf\/\">block ports with CSF<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your server uses firewalld or nftables instead, the same rules apply. The firewall must be active, deny inbound traffic by default, and be one you can edit under pressure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Close what you are not using<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">List every service that is listening:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ss<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-tulpn<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Disable any service on a public interface that you did not deliberately enable. Do not rely on the firewall alone. MySQL and PostgreSQL should bind to localhost, which means they accept connections from the server only. If you need remote access, add a firewall rule limited to known addresses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To see your server the way an outside scanner does, run a port scan from another machine. Here is an example of Nmap results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"762\" height=\"484\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/nmap-scan-results.png\" alt=\"Viewing Nmap Scan Results\" class=\"wp-image-101589\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/nmap-scan-results.png 762w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/nmap-scan-results-300x191.png 300w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To see the same list from inside the firewall, read <a href=\"https:\/\/www.inmotionhosting.com\/support\/security\/how-to-view-listening-ports-with-configserver-security-firewall-csf\/\">How to View Listening Ports with CSF<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use SFTP and disable FTP<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">FTP sends credentials in plain text. SSH File Transfer Protocol (SFTP) runs over SSH and needs no extra service. In WHM, search for <strong>FTP Server Selection<\/strong> and choose <strong>Disabled<\/strong> to turn FTP off server-wide. To block one cPanel user instead, list that user in <code>\/etc\/ftpusers<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">FTP accounts cannot use SFTP, so log in over SFTP with your cPanel or system user. If you must keep FTP for now, require encryption by following <a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/ftp\/disable-ftp-clear-plain-text-authentication\/\">How to Disable Plain Text FTP Authentication<\/a>. Never enable anonymous FTP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Keep IPv6 enabled and firewalled<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Some guides still tell you to disable IPv6 on a server. Turning off a protocol is not a security control. It can also break services that expect it. Write your IPv6 firewall rules the way you write IPv4 rules, then leave it on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Keep Software Current<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Automated scanners look for known vulnerabilities soon after they are disclosed. A monthly patch window is too slow for anything with a public exploit. On a Managed VPS, the InMotion Hosting team handles operating system patching. On a Self-Managed VPS, automate it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On AlmaLinux, install <code>dnf-automatic<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf-automatic<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Then set <code>upgrade_type = security<\/code> and <code>apply_updates = yes<\/code> in <code>\/etc\/dnf\/automatic.conf<\/code>. After that, enable the timer that follows those settings:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--now<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf-automatic.timer<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">On Ubuntu, <code>unattended-upgrades<\/code> is installed by default and applies security updates automatically. If it is missing, install it:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">unattended-upgrades<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">In WHM\u2019s <strong>Update Preferences<\/strong>, keep <strong>Automatically apply security updates as soon as they are available<\/strong> selected. PHP versions reach end of life on a published schedule. After that, known flaws stay open no matter how current everything else is. On cPanel servers, install versions through EasyApache 4 and assign them per domain in <strong>MultiPHP Manager<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a legacy application blocks an upgrade, use <a href=\"https:\/\/www.inmotionhosting.com\/tuxcare-php-els\/\">extended support for older PHP versions<\/a>. It keeps security patches coming while you plan the move. That is a bridge, not a destination.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some software cannot update itself. Keep a written inventory of what is installed, which version it runs, and who owns it. The software nobody remembers installing is the software that gets exploited.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">After a security disclosure<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A critical cPanel or WHM disclosure calls for four quick actions. First, subscribe to cPanel security advisories so you hear the day it happens. Second, check your installed build against the fixed build in the advisory:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">\/usr\/local\/cpanel\/cpanel<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-V<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Third, make sure the control panel ports are limited to trusted addresses, as covered earlier. Fourth, rotate credentials for admin accounts if the advisory says exposure was possible. Patching closes the hole. Rotation covers anything taken before you patched.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Block Automated Attacks<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Brute force protection<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The cPHulk tool in WHM blocks an address after a set number of failed logins. It watches logins to cPanel, WHM, email, FTP, and SSH. See <a href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/vps-setup-cphulk\/\">How to Set Up cPHulk on a VPS<\/a> for setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>lfd<\/code> daemon that comes with CSF watches log files and blocks at the firewall. Fail2ban does the same job on servers without cPanel. Running cPHulk with one log-based blocker is a reasonable setup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Application-layer filtering<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ModSecurity is an open-source web application firewall that runs inside Apache. It checks web traffic against a rule set before a request reaches your applications. If it is not enabled, follow <a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/apache\/install-modsecurity-apache-module\/\">Install the ModSecurity Apache Module<\/a>. For configuration details, read <a href=\"https:\/\/docs.cpanel.net\/ea4\/apache\/apache-modules\/apache-module-modsecurity\/#configuration-details\">Apache Module: ModSecurity<\/a> in the cPanel documentation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/mod-security-whm-1024x552.jpg\" alt=\"modsecurity interface in WHM\" class=\"wp-image-100900\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/mod-security-whm-1024x552.jpg 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/mod-security-whm-300x162.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/mod-security-whm-768x414.jpg 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/10\/mod-security-whm.jpg 1043w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Security headers and certificates<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Set security headers on the sites you host. <code>Content-Security-Policy<\/code> with <code>frame-ancestors<\/code> is the current control for clickjacking, which tricks visitors into clicking hidden page elements. Keep <code>X-Frame-Options<\/code> as a fallback for older browsers. Add <code>Strict-Transport-Security<\/code> to force HTTPS. Add <code>X-Content-Type-Options: nosniff<\/code> so browsers do not guess file types.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install SSL on every site. Free certificates issued through the Automatic Certificate Management Environment (ACME) protocol give the same encryption as paid ones. Extended Validation (EV) certificates cost more, and major browsers no longer show EV details in the address bar. Choose based on your business needs, not an expected boost in sales.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Find Problems Before Your Visitors Do<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Malware scanning<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ClamAV and Linux Malware Detect (maldet) are the standard open-source pair. The rkhunter tool adds rootkit checks, which look for malware that hides deep in the system. Schedule scans instead of running them by hand. The <a href=\"https:\/\/www.inmotionhosting.com\/support\/security\/clamav-or-imunifyav\/\">ClamAV or ImunifyAV<\/a> guide compares two scanner options for cPanel servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Scanning finds known malware patterns after files land. It does not stop the request that wrote them. That is why the runtime protection described in What InMotion Hosting Handles Below Your Server matters too.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Logs and a baseline<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Monitoring finds the incident that did not announce itself. Watch authentication logs for unusual logins. Watch web server logs for scanning and for unexpected 200 responses to odd paths. Watch resource graphs for load that does not match your traffic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set a baseline while things are normal. A change only means something if you know what normal looks like.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Process accounting<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Process accounting records what users actually run. On AlmaLinux, install and start it:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">psacct<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--now<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">psacct<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">On Ubuntu, use the <code>acct<\/code> package:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">acct<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--now<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">acct<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Once it runs, three commands help. <code>ac &lt;username&gt;<\/code> shows login time. <code>lastcomm &lt;username&gt;<\/code> lists commands that user ran. <code>sa -m<\/code> shows processes and CPU minutes per user. The records live in a system accounting file, not in shell history, so clearing history does not erase them.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The WHM Security Advisor<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Security Advisor in WHM scans the server for security issues and links most alerts to the interface that fixes them. Review it every quarter to catch configuration drift. See <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/how-to-scan-your-server-with-the-cpanel-security-advisor\/\">How to Scan Your Server with the cPanel Security Advisor<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Protect Your Data<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Backups are what separate an incident from a disaster. WHM runs <a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/setup-scheduled-cpanel-backups\/\">scheduled cPanel backups<\/a> under <strong>Backup Configuration<\/strong>, with daily, weekly, and monthly retention options.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"723\" height=\"343\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/vps-security-enable-backups.png\" alt=\"Enabling Automatic Backups in WHM\" class=\"wp-image-101608\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/vps-security-enable-backups.png 723w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/vps-security-enable-backups-300x142.png 300w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"934\" height=\"497\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/vps-security-backups-scheduling-and-retention.png\" alt=\"VPS Security - Backups - Scheduling and Retention\" class=\"wp-image-101609\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/vps-security-backups-scheduling-and-retention.png 934w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/vps-security-backups-scheduling-and-retention-300x160.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2022\/11\/vps-security-backups-scheduling-and-retention-768x409.png 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the 3-2-1 rule: three copies, on two types of media, with one stored off-site. The off-site copy protects you if ransomware locks your files or the server itself fails.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then restore one. A backup you have never restored is an assumption. Run a test restore into a separate test environment and write down how long it takes. You will need that number during a real incident.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On cPanel servers, leave the <code>securetmp<\/code> script enabled. It mounts <code>\/tmp<\/code> on its own file-backed partition. cPanel recommends mounting <code>\/tmp<\/code> with <code>nosuid<\/code>, and says you may add <code>noexec<\/code> after cPanel and WHM is installed. On a new server, separate <code>\/home<\/code> and <code>\/var<\/code> partitions also limit damage from a runaway process or a filled log.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What InMotion Hosting Handles Below Your Server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You do not harden the data center. InMotion Hosting runs the physical servers, the network, and DDoS protection at the edge for every VPS plan. Here is how that fits with the VPS security work in this guide.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Network-level protection.<\/strong> InMotion Hosting handles DDoS mitigation at the edge, before traffic reaches your server.<\/li>\n\n\n\n<li><strong>Runtime protection.<\/strong> InMotion Hosting deploys Monarx ThreatShield across its server fleet, so you install nothing. It protects the server at runtime, while code executes.<\/li>\n\n\n\n<li><strong>Full malware scanning and cleanup.<\/strong> Monarx Security is a separate paid add-on for VPS and Dedicated customers. It adds scanning and cleanup on top of the fleet-wide ThreatShield protection.<\/li>\n\n\n\n<li><strong>People who answer.<\/strong> The support team can help with the platform. Managed VPS customers contact Technical Support or Advanced Product Support through AMP for routine tasks such as patches. For hands-on security work beyond that, InMotion Solutions offers paid professional services. See <a href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/vps-support-options\/\">VPS Support Options<\/a> for every option.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Everything else in this guide is your job on a Self-Managed VPS. On a Managed VPS, you still own applications, users, and credentials. The checklist helps you track it all.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">VPS Security Checklist<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Copy this list into your runbook and review it for every server you manage. Start with the Access and Exposure tiers on any server that has been online for years. They close the most common gaps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Access<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SSH keys on, password and root login off<\/li>\n\n\n\n<li>WHM, cPanel, and SSH limited to known addresses<\/li>\n\n\n\n<li>Two-factor authentication on WHM, cPanel, and AMP<\/li>\n\n\n\n<li>Passwords 15 characters or longer, no forced rotation<\/li>\n\n\n\n<li>Account review done, obsolete users removed<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Exposure<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Firewall active, default-deny inbound, CSF on cPanel\u2019s maintained release<\/li>\n\n\n\n<li>Unused services off, databases on localhost<\/li>\n\n\n\n<li>FTP off, SFTP in use<\/li>\n\n\n\n<li>IPv6 on and firewalled<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Software<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automatic security updates on<\/li>\n\n\n\n<li>Control panel security updates automatic<\/li>\n\n\n\n<li>PHP version supported<\/li>\n\n\n\n<li>Software inventory written down<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Attack blocking<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Brute force protection running<\/li>\n\n\n\n<li>ModSecurity enabled<\/li>\n\n\n\n<li>Security headers set<\/li>\n\n\n\n<li>SSL on every site<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Detection<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Malware scans scheduled<\/li>\n\n\n\n<li>Logs checked against a baseline<\/li>\n\n\n\n<li>Process accounting on<\/li>\n\n\n\n<li>Security Advisor reviewed quarterly<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Recovery<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Backups scheduled, off-site copy kept<\/li>\n\n\n\n<li>Restore tested and timed<\/li>\n\n\n\n<li><code>securetmp<\/code> left on, <code>\/tmp<\/code> mounted with <code>nosuid<\/code><\/li>\n<\/ul>\n\n\n<div class=\"jumbotron\"><p style=\"margin-top:0;\"><img decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/custom\/security.svg\" align=\"right\" alt=\"Secure VPS Hosting\" height=\"80\">Enjoy high-performance, lightning-fast servers with increased security and maximum up-time with our <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">Secure VPS Hosting<\/a>!<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Linux VPS    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>cPanel or Control Web Panel    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Scalable    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Website Migration Assistance<\/p>\r\n<p style=\"margin:10px 0;\"><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/linux-vps\">Linux VPS Hosting<\/a><\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A VPS gives you root access. That also makes you the one who closes open ports and patches forgotten services. This guide shows how to secure a VPS in six tiers: access, exposure, updates, attack blocking, detection, and recovery. Work through them in order, then reuse the checklist at the end for every server. Commands<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_ayudawp_aiss_exclude":false,"_ayudawp_aiss_exclude_summary":false,"_ayudawp_aiss_summary":"With a Managed VPS, the InMotion Hosting team handles operating system patching, control panel security updates, and daily automatic backups. Its original vendor shut down on August 31, 2025. cPanel now maintains a fork, a continued copy of the code, at github.com\/cpanel\/cpanel-csf. cPanel's version ships as the package and updates through the system package manager, not the old built-in auto-update. In WHM, search for FTP Server Selection and choose Disabled to turn FTP off server-wide.","_ayudawp_aiss_summary_provider":"extractive","_ayudawp_aiss_summary_hash":"4c87e2aba70de55810958855db000524a97e64f0","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4324],"tags":[],"class_list":["post-48325","post","type-post","status-publish","format-standard","hentry","category-vps-hosting"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Secure a VPS: Hardening Guide | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn how to secure a VPS in six tiers: access, exposure, updates, attack blocking, detection, and backups, with a hardening checklist.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/\" \/>\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 VPS: Hardening Guide | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to secure a VPS in six tiers: access, exposure, updates, attack blocking, detection, and backups, with a hardening checklist.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-09T12:50:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-11T19:21:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/10\/24-ways-to-VPS-Security.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/10\/24-ways-to-VPS-Security.png\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/person\\\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"How to Secure a VPS: Server Hardening Best Practices\",\"datePublished\":\"2019-10-09T12:50:26+00:00\",\"dateModified\":\"2026-11-11T19:21:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/\"},\"wordCount\":2492,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/how-to-secure-a-vps-server-hardening-1024x538.png\",\"articleSection\":[\"VPS Hosting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/\",\"name\":\"How to Secure a VPS: Hardening Guide | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/how-to-secure-a-vps-server-hardening-1024x538.png\",\"datePublished\":\"2019-10-09T12:50:26+00:00\",\"dateModified\":\"2026-11-11T19:21:36+00:00\",\"description\":\"Learn how to secure a VPS in six tiers: access, exposure, updates, attack blocking, detection, and backups, with a hardening checklist.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/how-to-secure-a-vps-server-hardening.png\",\"contentUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/how-to-secure-a-vps-server-hardening.png\",\"width\":2100,\"height\":1103,\"caption\":\"How to Secure a VPS: Server Hardening Best Practices hero image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/product-guides\\\/vps-hosting\\\/ways-to-harden-your-vps-hosting\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Secure a VPS: Server Hardening Best Practices\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inmotionhosting\\\/\",\"https:\\\/\\\/x.com\\\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/person\\\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inmotion-hosting\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/InMotionHosting\"],\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/author\\\/inmotion-hosting-contributor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Secure a VPS: Hardening Guide | InMotion Hosting","description":"Learn how to secure a VPS in six tiers: access, exposure, updates, attack blocking, detection, and backups, with a hardening checklist.","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:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/","og_locale":"en_US","og_type":"article","og_title":"How to Secure a VPS: Hardening Guide | InMotion Hosting","og_description":"Learn how to secure a VPS in six tiers: access, exposure, updates, attack blocking, detection, and backups, with a hardening checklist.","og_url":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2019-10-09T12:50:26+00:00","article_modified_time":"2026-11-11T19:21:36+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/10\/24-ways-to-VPS-Security.png","type":"image\/png"}],"author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/10\/24-ways-to-VPS-Security.png","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"How to Secure a VPS: Server Hardening Best Practices","datePublished":"2019-10-09T12:50:26+00:00","dateModified":"2026-11-11T19:21:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/"},"wordCount":2492,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-1024x538.png","articleSection":["VPS Hosting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/","url":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/","name":"How to Secure a VPS: Hardening Guide | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening-1024x538.png","datePublished":"2019-10-09T12:50:26+00:00","dateModified":"2026-11-11T19:21:36+00:00","description":"Learn how to secure a VPS in six tiers: access, exposure, updates, attack blocking, detection, and backups, with a hardening checklist.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2026\/11\/how-to-secure-a-vps-server-hardening.png","width":2100,"height":1103,"caption":"How to Secure a VPS: Server Hardening Best Practices hero image"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/ways-to-harden-your-vps-hosting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Secure a VPS: Server Hardening Best Practices"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","primary_category":{"id":4324,"name":"VPS Hosting","slug":"vps-hosting","link":"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/48325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=48325"}],"version-history":[{"count":74,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/48325\/revisions"}],"predecessor-version":[{"id":900824,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/48325\/revisions\/900824"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=48325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=48325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=48325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}