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

nuy

OracleLinux9.1-en

OracleLinux9.1 : Clamav(anti-virus) , Mail Server

Clamav(anti-virus) 1.Clam AntiVirus install # dnf -y install clamav clamd clamav-update Mail Server Installation 1. Postfix 1.1 Install Install Postfix and build an SMTP server Mail server : Postfix + Clamav + Amavisd+SpamAssassin 1.Real-time scanning of e-mails ①Install Amavisd and Clamav Server
OracleLinux9.1-en

OracleLinux9.1 : FTP Server , Samba FileServer Install

1.FTP Server 1.1vsftpd Install # dnf -y install vsftpd 1.2vsftpd configuration Save the unedited vsftpd.conf with .bak # cp /etc/vsftpd/vsftpd.conf /home/huong/vsftpd.conf.bak 2. vsftpd SSL/TLS Configure Vsftpd to use SSL/TLS 2.1 Create self-signed certificates This work is not required if you are using a trusted, legitimate certificate such as Let's Encryp 3. File server installation with Samba Build a file server with access rights that requires user authentication with Samba. Installation Procedure ①Create shared folders with access rights that require user authentication ②Accessible group creation ③Creation of users belonging to accessible groups ④Configuration File Edit
OracleLinux9.1-en

OracleLinux9.1 : SSH , Firewalld , NTP Server

1.Setting up a remote connection via 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.
FreeBSD13.2_en

FreeBSD13.2 ; Initial setup (Vim , SSH , firewall, NTP server)

1. Vim Install Install Vim, which you are familiar with as an editor, as follows 2. SSH Connection Security Measures 2.1 SSH port changed, root user login disabled 3. Firewall Settings FreeBSD has the following firewalls ・pf ・ipfw ・ipf In this case, we will use ipfw to configure the firewall。 4. NTP Server Settings 4.1 Rewrite the referenced NTP server in /etc/ntp.conf. Add an appropriate server in Japan.
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 ; 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".