Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

nuy

FreeBSD13.2_en

FreeBSD13.2 ; Web Server SSL、Webmin

1.Web server (Apache) SSL conversion The ports can be further updated with FreeBSD's periodic job settings. Install certbot via pkg, and include a plugin for apache to update in webroot mode. 1.1 Installing the Certbot tool for Let's Encrypt Run the following command to install the Certbot package and the Apache HTTP plug-in 2. Webmin Install Webmin is a web browser-based tool for configuring Unix-like operating systems (OS) such as Linux. It allows users to make numerous changes to internal OS settings such as user and disk usage limits, services, configuration files, etc., and to modify and control many open source applications such as Apache, PHP, MySQL, and others. Webmin is built primarily in Perl and runs as its own process and web server. By default, it communicates on TCP port 10000.
Debian12.1_en

Debian12 ; NTP ,FTP Server Installation

1. Install NTP server 2. Install FTP Server 2.1 Install Vsftpd
Debian12.1_en

Debian12 ; SSH connection using public key cryptography

Create public and private key pairs Create a public/private key pair for a user connecting to a Linux server using OpenSSH. Use ssh-keygen to create the key pair. This time, we will create a key set using the RSA cipher used in the SSH protocol Version 2. The creation of a public/private key pair is performed with remote login user privileges (e.g., huong). If you do not specify the destination and file name, id_rsa and id_rsa.pub will be created in /home/huong/.ssh/. On the way, enter the password for the key.
Debian12.1_en

Debian12 ; SSH , Firewall Setting

1. SSH Service Security Settings The SSH service allows the root user to log in by default, and since the root user already knows the user name and can log in to the server with administrative privileges once the password is known, we will deny this setting. 1.1 Creating a General User If you have created a general user when installing Debian, this procedure is not necessary. If the only user created on the server is root, remote login via SSH will not be possible, so if a user has not been created during OS installation, a user must be created in advance. Users can be created with the "useradd" command. The "-m" option creates a home directory and the "-p" option specifies the password. For example, to set "debianuser" as the user account name and "123456" as the password, execute the following
Debian12.1_en

Debian12 ; Initialization

1.Installing and configuring the vim editor Debian has "nano" as the default editor. nano is somewhat difficult to use, and there are few environments where it is used, so we will introduce the procedure for changing the editor to "vim".。 1.1 Check vim package Debian has vim installed by default, but it is a package called "vim-tiny", which is a less functional version. Let's check the installed vim package. Debian uses the "dpkg" command to check packages. The "-l" option displays a list of packages. Since the "dpkg" command as is will show all packages installed on the system, we will use the "grep" command to extract only those packages that contain the string "vim". Execute as follows
Debian11.5 Building a server

Debian11.5 ; SNORT2 , Tripwire Install

1.Install SNORT2 Snort is an open source network intrusion detection system capable of performing real-time traffic analysis and packet logging on IP networks. It can perform "protocol analysis," "content search," and "matching," and can be used to detect a variety of attacks, including "buffer overflows," "stealth port scans," "CGI attacks," "SMB probes," "OS fingerprinting attempts," "semantic URL attacks," and "server message block probes. 2.Install Tripwire Implement a system to detect file tampering on Linux servers by crackers. This time, Tripwire, a host-based IDS (IDS=Intrusion Detection System), will be installed as the file tampering detection system. Tripwire creates a database of file status at the time of installation, and detects file additions/changes/deletions by comparing the database with the current status of the file.
Debian11.5 Building a server

Debian11.5 ; System Backup and Restore

1. System Backup 1.1 Backup under /var/www/html ① Create backup_all.sh script under /opt 1.2 Mysql database backup ①Create db_backup.sh script under /opt # vi /opt/db_backup.sh db_backup.sh script contents 2. System Restore 2.1 Restore backup files under HTML ① Store HTML backup files used for backup in the "/ (root)" directory Select the backup file with the latest timestamp (e.g. www_back_20220501.tar.gz) 2.2 Restore MySQL database ①Save DB backup file to any directory and extract data # cd /var/www/backup/db_bak
Debian11.5 Building a server

Debian11.5 ; Let's Encrypt WEB , Mail Server SSL

1. Obtain a certificate (Let's Encrypt) 1.1 advance preparation ①Enable mod_ssl # a2enmod ssl 2. SSL/TLS (Let's Encrypt) configuration for Apache2 ①Edit Apache2 SSL-related configuration files 3. SSL/TLS (Let's Encrypt) settings on the mail server 3.1 Obtaining a certificate for the mail server Obtain a certificate for the mail server, but it cannot be obtained in the same way as above, so the following with the "--standalone" option fails.
Debian11.5 Building a server

Debian11.5 ; Initialization

1. Installing and configuring the vim editor Debian has "nano" as the default editor. nano is somewhat difficult to use, and there are few environments where it is used, so we will introduce the procedure for changing the editor to "vim".。 1.1 Check vim package Debian has vim installed by default, but it is a package called "vim-tiny", which is a less functional version. Let's check the installed vim package. Debian uses the "dpkg" command to check packages. The "-l" option displays a list of packages. Since the "dpkg" command as is will show all packages installed on the system, we will use the "grep" command to extract only those packages that contain the string "vim". Execute as follows
OpenSUSE15.5_en

OpenSUSE15.5 ; Snort2 Install

1.SNORT2 Snort is a network-based IDS (Intrusion Detection System). It captures packets flowing over a network and detects suspicious packets. The source file is used directly from https://snort.org/. 1.1 Advance preparation Install required libraries
OpenSUSE15.5_en

OpenSUSE15.5 ; OS Install

OpenSUSEとは OpenSUSE is a Linux distribution that is community-based, free to the public, and active in adopting the latest technologies. It is sponsored by Novell and developed by the community. Originally, SUSE Linux was developed by SUSE, but after the acquisition of SUSE by Novell in 2003, Novell shifted the development structure to community-based by the OpenSUSE project as a distribution aiming for 100% open source, and changed the name from SUSE Linux to OpenSUSE Linux The name was changed to the current name. openSUSE is available as Leap, the stable version, and Tumbleweed, which uses a rolling-release model and is also the basis for the paid-for version of SUSE Linux Enterprise.
OpenSUSE15.5_en

OpenSUSE15.5 ; Various settings after OS installation

1.Using su command Not required if root password is set at the time of installation If you set a root password, set it as follows Log in as a general user 2. Modernize the system To modernize the system, enter the following command 3.locate Install The find command is used to search for a specific file on the entire Linux system, but find's options are somewhat confusing. In such cases, it is useful to have the locate command available, which can extract all files with a given filename
OpenSUSE15.5_en

OpenSUSE15.5 ; Firewall , SSH、NTP Server

1. Setting up remote connection by SSH SSH is a service for connecting remotely to a server and is basically running immediately after the OS is installed, but the default settings are somewhat insecure. Here we will configure the default settings to increase the security of ssh connections. 1.1 SSH service configuration file changes Modify the configuration file to change the SSH service settings. The SSH service configuration file is "/etc/ssh/sshd_config".
OpenSUSE15.5_en

OpenSUSE15.5 ; SSH connection with public key

Create a private key for the client and a public key for the server to allow login with key pair authentication 1.key pair creation Create a public/private key pair for a user connecting to the Linux server using OpenSSH. Use ssh-keygen to create key pairs. Creation of public/private key pairs is performed with remote login user privileges. If you do not specify the creation destination and file name, id_ecdsa and id_ecdsa.pub will be created in /home/(user name)/.ssh/. On the way, also enter the password for the key.
OpenSUSE15.5_en

OpenSUSE15.5 ; FTP Server

1. Vsftpd 1.1vsftpd Install It is already installed at the time of openSUSE installation. If not, you can install it with the following command