OS Hardening
Just allow strong algorithms: echo “MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256” >> /etc/ssh/sshd_config echo “KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org” >> /etc/ssh/sshd_config echo “disable_vrfy_command=yes” >> /etc/postfix/main.cf Change SSH Port Do not use default port 22
Bulk rename files on Windows
Count connections to the Server
Find nginx pid: Results: pool: mean nginx run php-fpm master: not worker, just is a parent cache manager: Just for cache color=auto: The ps -ef | grep nginx worker process: This is result. 57234 is parent pid, this pid is 57235 So, if we have many worker process pids from 1833681 to 1833692. We can…
Write Error Logs only in mongodb.log
Install VPN Client on Linux
Create new Linux User with ChrootDirectory
How to alert when disk usage is greater than the allowable threshold easily?
Alert when disk usage is greater than the allowable How to alert when disk usage is greater than the allowable threshold easily?You can set a cron job to check disk usage then send to you alert-API when it is greater than the allowable threshold. Here is an example, hourly periodic check. If the system has…
Completely remove user accounts on linux for security
Install and use Docker on Linux/ Centos/ Rocky Linux
[Installation] System monitoring with Grafana + Prometheus + Node Export on Linux
This guide use RHEL/Centos/RockyLinux. Other OS are same. You should have 2 SERVERs: Monitoring server: Install Grafana Monitored server: Install Prometheus PROMETHEUS INSTALL (On monitored server) Create user for this service: // Swap to prometheus user: Create directories: Download Prometheus: Create a config file: Create a service file, this is an examle use port 9090…