Click here for "Error Codes for Commercial Air Conditioners".(Japanese Version)

2022-10

fedora36_en

Fedora36 ; SNORT2 , Tripwire Install

SNORT Installation1.advance preparation①Add the CodeReady Red Hat repository and install the required software# dnf -y install bison flex libpcap-devel pcre-devel openssl-devel libdnet-devel libtirpc-devel libtool nghttp2 libnghttp2-devel# mkdir /var/src②Installing DAQ# cd /var/srcTripwire Installation1.Install# dnf -y install tripwire
fedora36_en

Fedora36 ; Clam AntiVirus , Mail Server

Install Clamav ( anti-virus software )1.Install Clam AntiVirus# dnf -y install clamav clamd clamav-update2.Edit Clam AntiVirus configuration file# vi /etc/clamd.d/scan.confMail Server Install1. Install Postfix1.1 InstallInstall Postfix and build an SMTP serverMail Server : Postfix + Clamav + Amavisd+SpamAssassin1.Real-time scanning of E-mails①Install Amavisd and Clamav Server# dnf -y install amavisd-new clamd perl-Digest-SHA1 perl-IO-stringy
fedora36_en

Fedora36 : WEB Server(Apache2) Install

Apache2 installation and virtual host configuration1.Apache2 Install①httpd install# dnf -y install httpdVersion Check# httpd -verver version: Apache/2.4.54 (Fedora Linux)Server built: Jun 17 2022 00:00:003.Virtual Host SettingsAssign and configure the [FQDN] to be operated on the virtual host in the document root [/var/www/html/FQDN] directoryConfirmation of CGI Script Usage①CGI availability checkPHP installation and configuration1.PHP Installation①Install# dnf -y install php php-mbstring php-pear
fedora36_en

Fedora36 : FTP Server(Vsftpd) , File Server(Samba)

1.FTP Server Installation1. 1 Vsftpd Install# dnf -y install vsftpd1.2 Vsftpd configurationSave the unedited vsftpd.conf with .bak2. vsftpd SSL/TLSConfigure Vsftpd to use SSL/TLS2.1 Create self-signed certificates3. File server installation with SambaBuild a file server with access rights that requires user authentication with Samba.Installation Procedure① Create shared folders with access rights that require user authentication②Creation of accessible groups③Creation of users belonging to groups that can be accessed④Configuration File Editing
fedora36_en

Fedora36 ; Remote connection with SSH public key cryptography

SSH public key cipher settingCreate an SSH private key on Windows and an SSH public key on the server to allow login by key pair authentication.1.Create key pair with ECDSABecome an ordinary user and create a key pair in ECDSA# su – $ ssh-keygen -t ecdsaGenerating public/private ecdsa key pair.Enter file in which to save the key (/home/huong/.ssh/id_ecdsa):Created directory '/home/huong/.ssh'.Enter passphrase (empty for no passphrase):  ← Enter any password
fedora36_en

Fedora36 ; SSH 、Firewalld

1.Remote connection by SSHSSH is a service for connecting remotely to a server, basically running immediately after OS installation, but the default settings are somewhat insecure.Configure the default settings to increase the security of ssh connections.1.1 SSH service configuration file changesThe SSH service configuration file is "/etc/ssh/sshd_config".Open the configuration file in a vi editor.# vi /etc/ssh/sshd_config
Debian11.5 Building a server

Debian11.5 ; logwatch , Disk Usage Check Script

1. Introduce disk usage check script1.1 Scripting# cd /opt/script/# vi disk_capacity_check.shContents of disk_capacity_check.shConfigured to notify when disk usage exceeds 80%.2. Log analysis tool logwatch installed2.1 logwatch Install# apt -y install logwatch2.2 Edit logwatch configuration file
Debian11.5 Building a server

Debian11.5 ; Anti-virus(Clamav) 、Mail Server

1. Antivirus software Clamav installedInstall Clam AntiVirus, a free anti-virus software for Linux, as an anti-virus measure.By installing this anti-virus software, you can not only scan the entire server for viruses, but also scan incoming and outgoing mail for viruses if you build and configure a mail server.1.1 Install# apt install clamav clamav-daemon2. Mail server installationPostfix was developed as a Mail Transport Agent (MTA) to replace sendmail, and is a mail server that is highly compatible with sendmail, secure, easy to maintain, and fast.In addition, since Postfix only functions as an SMTP server for sending mail, the POP server Dovecot for receiving mail will be installed separately in the latter half.2.1 Postfix : Installation Configuration3 Applied ClamAV to mail server PostfixSet up Postfix and Clamav to work together to scan incoming and outgoing mail in real time.①Install Amavisd and Clamav Daemon and start Clamav Daemon
Debian11.5 Building a server

Debian11.5 ; NTP ,FTP Server Installation

1. Install NTP server# apt -y install chrony# vi /etc/chrony/chrony.conf# Line 8.:Comment the default settings and add the NTP server for your time zone.#pool 2.debian.pool.ntp.org iburstpool ntp.nict.jp iburst# Add to the last line (Range for which time synchronization is allowed)allow 192.168.11.0/242. Install FTP Server2.1 Install Vsftpd# apt install vsftpdFTP Port21 allowed# ufw allow ftp# ufw reload
Debian11.5 Building a server

Debian11.5 ; SSH , Firewall Setting

1. SSH Service Security SettingsThe 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.2. Firewall SettingsSince Debian often uses software called "ufw" to configure firewalls, we will configure firewall settings using ufw.Since ufw is not installed when the OS is installed, the ufw package must be installed prior to configuration. The following is a procedure to configure minimal filter settings after installation.Filter rules to be set in ufw• All packets forwarded to the server are rejected• All packets sent from the server to the outside are allowed• The first port to allow is the port for SSH• Limit packets coming into the server