itsmeit.bizitsmeit.biz
  • Home
  • Windows
    • Windows Software
  • Ubuntu & Linux
    Ubuntu & Linux
    The top blog articles on Ubuntu and Linux, featuring valuable tips and tricks, empower you to master these operating systems and enhance your experience.
    Show More
    Top News
    How to Remove Ubuntu Dual boot Windows 11 UEFI and Legacy
    How to Remove Ubuntu Dual boot Windows 11 UEFI and Legacy
    November 10, 2023
    How to install php7.4 on Ubuntu & Config php7.4-fpm - itsmeit.biz
    How to install php7.4 on Ubuntu 22.04 | 20.04 LTS
    November 10, 2023
    Install Ubuntu dual boot Windows 11 | 10 UEFI And Legacy
    Install Ubuntu dual boot Windows 11 | 10 UEFI & Legacy
    November 10, 2023
    Latest News
    How to install Composer on Ubuntu 20.04 | 22.04 & Linux
    November 13, 2023
    How to Configure Redis Cache to Speed ​​Up WordPress Site
    November 15, 2023
    Install Ibus-bamboo or Ibus-unikey for Accented Letters on Ubuntu 22.04
    November 11, 2023
    How to install MariaDB on Ubuntu 22.04, 20.04 and Debian
    November 11, 2023
  • Web developer
    • Wordpress Theme
      • Blog News
      • Fashion Theme
      • Theme Elementor
      • WooCommerce Theme
    • Wordpress Plugin
    • Magento Developer
Reading: How to Safely Configure Security for Linux VPS and Ubuntu Server
Share
Font ResizerAa
itsmeit.bizitsmeit.biz
Font ResizerAa
  • Linux & Ubuntu
  • Windows
    • Tips & Trick
    • Windows Software
  • Web developer
    • Magento Developer
    • Wordpress Plugin
    • WP Blog Theme
    • WP Fashion Theme
    • WooCommerce Theme
  • Log Out
Have an existing account? Sign In
Follow US
Copyright © 2022. All Rights Reserved.
Ubuntu & Linux

How to Safely Configure Security for Linux VPS and Ubuntu Server

duyanh
Last updated: November 10, 2023
By duyanh Published April 27, 2023
Share
SHARE

Table of contents

  1. How to Configure Security Linux VPS, Ubuntu Server Safely
    1. 1. Protect Your VPS with a Firewall: Essentials for Server Security
      1. Configure Ubuntu Server Security with ufw Firewall
    2. 2. Securing Your Server: Use SSH Key and Disable Root Password
    3. 3. Make sure your VPS server is protected from Malware
    4. 4. Other Ways to Configure VPS Security for Ubuntu and Linux Website

How to configure the security of your Linux VPS or Ubuntu Server. These measures will help minimize the risk of DDOS attacks, vulnerabilities, malware, and other security threats, while also ensuring the continued reliability and performance of your server.

How to Configure Security Linux VPS, Ubuntu Server Safely

Although VPS service providers provide some default security measures, users can still take additional steps to better secure their VPS by configuring and installing software.

How to Configure Security Linux VPS, Ubuntu Server 99.9% Safely

1. Protect Your VPS with a Firewall: Essentials for Server Security

Installing and authenticating a firewall on the server is crucial for minimizing the risk of unwanted traffic, spam tool attacks, bots, and other security threats. Most Linux-based operating systems come pre-installed with a firewall, such as iptables, firewalld, and ufw for Debian. It is important to configure security Linux VPS and set up the firewall properly to ensure maximum protection for your server.

Set up a firewall (Firewall) to protect Ubuntu or Linux VPS (illustration)
Set up a firewall (Firewall) to protect Ubuntu or Linux VPS (illustration)

For easier management of iptables and integration with other control panels, ItsmeIT highly recommend installing the free ConfigServer Firewall (CSF). This firewall configuration script can improve the security of your Linux VPS or Ubuntu Server and offer an intuitive and advanced interface for managing firewall settings. To install and activate the firewall, you can utilize the following command:

sudo apt install ufw
sudo ufw enable

After you have enabled the Firewall, you can verify the status of “ufw” by using the command:

sudo ufw status

Configure Ubuntu Server Security with ufw Firewall

  • Use ufw to open port 80, 443 and 8080
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 8080/tcp
  • Use ufw to deny, close the connection port
sudo ufw deny 8899

Using the above command as an example for configure security Linux VPS, if you wish to block external connections to your server through port 8899, you can use the command below. Conversely, if you want to allow connections through this port, you can run the following command instead:

sudo ufw allow 8899

2. Securing Your Server: Use SSH Key and Disable Root Password

Create ssh key to configure Linux VPS security, Ubuntu server (illustration)
Create ssh key to configure Linux VPS security, Ubuntu server (illustration)

Typically, VPS providers will provide you with a root user, password, and IP address to log in to your VPS server. You can access your server by using the following command: ssh root@ipaddress.

However, this method is less secure compared to using public keys for configure security Linux VPS. Itsmeit has published an article on creating and using SSH keys on Ubuntu and Debian that you can refer to. By using public keys, even if your VPS login password is compromised, intruders cannot access your server without the key file.

Using FTP for remote login is not recommended. Instead, use SFTP with a public key for a more secure method. Filezilla is a simple yet effective tool for managing websites on VPS, allowing for easy file uploads, permission changes, and file editing. This is a highly recommended method for securing Ubuntu VPS and Linux Debian.

To configure security Linux VPS, it is recommended to create a user with separate management permissions for folders and files instead of using the root user. For example, if you have a website running directory named httpdocs, you can assign permission to this directory using the following command: $USER:group. This is a step in configure security for your Ubuntu server. The method used by itsmeit is illustrated in the screenshot below:

Example permissions for files and folders on Ubuntu and Linux (illustration)
Example permissions for files and folders on Ubuntu and Linux (illustration)

ItsmeIT has provided instructions on how to use the chmod command to manage and decentralize permissions in order to configure security for Ubuntu server in this resource.

3. Make sure your VPS server is protected from Malware

The next step to increase the security of your VPS is to monitor the files uploaded on the VPS. Besides setting up a firewall to protect incoming traffic and secure VPS with SSH public key, file monitoring helps you detect and deal with possible security holes. This way, you can keep your VPS safe and certainly not attacked from malware or hackers.

Besides monitoring file uploads on a VPS, scanning for viruses and malware on a Ubuntu or Debian VPS is also an important step in protecting your system. This helps you detect suspicious activity and quarantine infected files to prevent potential attacks. ItsmeIT has shared 3 Linux antivirus and scanning tools to help you find and remove malicious files. By applying the above method for configure security Linux VPS, you can ensure that your VPS system will not be easily hacked, and as a result, your important data is better protected.

Virus protection for linux ubuntu (illustration)
Virus protection for linux ubuntu (illustration)

4. Other Ways to Configure VPS Security for Ubuntu and Linux Website

As a website owner, it is crucial to be aware that your website may be targeted by DDoS attacks from malicious individuals or competitors. These attacks can take advantage of vulnerabilities in your system and flood your server with a massive number of requests in a short period, leading to your server becoming unresponsive and your website going offline. Therefore, it is vital to take appropriate measures to configure security Linux VPS and protect your website against DDoS attacks.

Configure VPS Security for Ubuntu and Linux Website
Configure VPS Security for Ubuntu and Linux Website (illustration)

It’s great to see that you have summarized some effective ways to secure VPS servers running on Linux Debian or Ubuntu. The tips you have provided, such as setting up a firewall, using SSH public key, monitoring files, and protecting against DDoS attacks, are all important measures to ensure the security of VPS servers.

It’s important to note that while Cloudflare can be useful in mitigating DDoS attacks, it should not be relied upon as the sole solution for website security when configure security Linux VPS. Furthermore, it’s worth mentioning that the SSL certificate provided by Cloudflare has a validity of up to 15 years only for the Universal SSL certificate, while custom SSL certificates are valid for up to 365 days.

Overall, it’s always good to stay vigilant and continuously review and improve the security measures in place to protect your VPS server from potential threats.

– Advertising –

Share this Article
Facebook Twitter Pinterest LinkedIn Reddit Telegram
Leave a comment Leave a comment
Subscribe
Connect with
Login
Notify of
guest
Connect with
guest
0 Comments
Inline Feedbacks
View all comments
Previous Article Download Photoshop 2023 v24.7.1 Generative Fill (Firefly AI + Fix Unlicensed + Neural Filters) Photoshop 2023 v24.7.1 (Fix Unlicensed + Neural Filters)
Next Article How to use netstat command Linux or Ubuntu 22.04 With Examples How to use netstat command in Linux or Ubuntu 22.04 + Examples

You Might Also Like

How to install Composer on Ubuntu 20.04 | 22.04 & Linux

How to Configure Redis Cache to Speed ​​Up WordPress Site

Install Ibus-bamboo or Ibus-unikey for Accented Letters on Ubuntu 22.04

How to install MariaDB on Ubuntu 22.04, 20.04 and Debian

How to Install Android Studio on Ubuntu 22.04 or 20.04

Stay Connected

Facebook Like
Twitter Follow
Pinterest Pin
Telegram Follow

Popular Posts

Download Adobe Photoshop 2024 v25.2.0.196 Repack (Full Activated)
Photoshop 2024 Repack v25.2.0.196 Full + AI / Neural Filters
December 9, 2023 431 Views
Download IDM FULL Crack v6.42.2 + Repack (Fix fake serial)
Download IDM FULL Crack v6.42.2 + Repack (Fix fake serial)
December 8, 2023 677 Views
Download WPBakery v7.2 Drag and Drop WordPress Page Builder Plugins
WPBakery v7.2 Drag and Drop WordPress Page Builder Plugins
December 4, 2023 25 Views
Download Plugin Product Video Gallery for Woocommerce v1.5.0
Plugin Product Video Gallery for Woocommerce v1.5.0
November 17, 2023 11 Views
Download Prevent Spam Register Plugin - Block WordPress Spam Accounts
Prevent Spam Register Plugin – Block WordPress Spam Accounts
November 17, 2023 16 Views
Elementor PRO v3.17.0 Plugin (Full Templates Pack + Demo)
Download Plugin Elementor PRO 3.17.0 (+Full Templates Pack)
November 17, 2023 39 Views
We provide tips and tricks on Internet technology, computers, servers as well as share experiences for developers and website designers.

DMCA.com Protection Status

Quick Link

  • Linux | Ubuntu
  • Windows & Software
  • Magento Developer
  • Wordpress Plugin
  • Wordpress Theme

General Policy

  • About US
  • Contact US
  • Disclaimer
  • Privacy Policy
  • Terms of Service

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

itsmeit.bizitsmeit.biz
Follow US
Copyright © 2023. All Rights Reserved.
  • WP Blog Theme
  • WP Fashion Theme
  • WooCommerce Theme
  • Wordpress Plugin
Welcome Back!

Sign in to your account

Continue with Google
Continue with TikTok
Continue with GitHub
Register Lost your password?