news
Serverspace has added a new Rocky Linux OS
DF
June 1, 2023
Updated June 1, 2023

Initial configuration of Ubuntu Server 22.04

Maintenance Networks Security Ubuntu

Ubuntu Server 22.04 is the latest release of the popular Linux distribution for servers. In this article, we will discuss the initial configuration steps for Ubuntu Server 22.04 that can help ensure security and optimize the performance of your server.

Update your Ubuntu system

Before proceeding with any other configuration steps, it is necessary first update the entire system by inserting this in terminal:

sudo aptitude update
sudo aptitude upgrade

This updates the software list and upgrades installed packages.

Install necessary software

To facilitate the proper functioning of the system, it is essential to install additional software packages. For instance, a text editor such as nano, a package for managing compilations such as build-essential, a package for automatic updates such as unattended-upgrades, and others.

sudo aptitude install nano build-essential unattended-upgrades

Some of these packages can be installed from the Ubuntu Software Center.

Configure users

For the configuration of users, open the terminal and run the following commands:

sudo adduser user1
sudo usermod -aG sudo user1

The command "sudo adduser user1" adds a new user, while "sudo usermod -aG sudo user1" assigns the user to the administrator group.

Configure ssh

SSH server enables remote maintenance of the operating system through the internet. To configure ssh, simply run the following command:

sudo aptitude install openssh-server

By default, the SSH server does not grant access to any user. It is necessary to configure users, allowing them access through SSH keys.

Configure the firewall

The firewall is used to ensure the safety of your system. Ubuntu Server 22.04 comes with the built-in UFW (Uncomplicated Firewall). To configure the UFW rules, execute the following commands:

sudo ufw allow 22/tcp
sudo ufw enable

The first command permits incoming connections through the SSH protocol, while the second command activates the firewall.

Check system for vulnerabilities

To check your system for vulnerabilities, you may use several tools, including Lynis. To install Lynis, run this command:

sudo aptitude install lynis

To run Lynis, execute :

sudo lynis audit system

Lynis will analyze OS and provide a report of any vulnerabilities found.

System optimisation

Several actions may be taken to optimize Ubuntu-Server 22.04, including:
- Disabling any unused services.
- Optimizing kernel configuration.
- Setting optimal swap parameters.
- Optimizing network parameters.
These are just some of the steps that can be taken to optimize the performance of Ubuntu Server 22.04.
Security and performance optimization are crucial factors in the proper functioning of your Ubuntu Server 22.04.

Conclusion

In this guide we deploy and setup new server based on Ubuntu server 22.04, include remote shell setup,OS update, firewall setup and vulnerabilities scan.

Vote:
4 out of 5
Аverage rating : 4
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.