Block an IP address in firewall-cmd

Sometimes you need to block an IP address (or a range of IP addresses) from accessing your machine. In this case firewall-cmd can help you through these commands: And finally, if you decide to remove this rule, you can use these commands:
Setup High Availability for HAProxy

To prevent service failure during disasters like server crash or so on, we have to find Single Point of Failure components and setup High Availability solutions for them. In this article I am going to define how to setup High Availability for HAProxy service. The structure of service would be something like below: In this […]
sudo without password

Typing password for sudo commands is an awful experience. So here’s what we should do to stop linux asking for password: 1. Backup the sudoers file: 2. Open the sudoers file for edit: 3. Edit sudoers file:
PHP: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]

if you have these errors in your log file: It means that the server’s default authentication plugin is different from your client’s. So you have to change the user’s default authentication plugin by this command:
How to make Apache HTTPD Web Server more secure

There are some known security issues that can make an Apache HTTPD Web Server insecure. If using Apache HTTPD as a web service is your approach, then you should scan your web server in first step. There are many tools to scan a web server. here we will use NIKTO. Nikto is a free tool […]
Connection Encryption in Oracle Database
To encrypt connections between client and database server you have to set some parameters in sqlnet.ora file ($ORACLE_HOME/network/admin/sqlnet.ora) of server and client (you have to install oracle client on the client): server side: client side: the ENCRYPTION_CLIENT parameter can have one of these values: ACCEPTED : The client or server will allow both encrypted and […]
Add New Disk to RedHat-based Linux without reboot
If you add a new disk to your OS, you won’t find this device in the device list (fdisk -l command). So you have two options to make it available: Reboot your machine Make the OS rescan all connected devices In operational environments, the first option is not considerable. So we have to choose the […]
Change the Character Set & Collation of a table
To change the Character Set and Collation of a field of a table you have to use this query: if the table contains data, you have to update that data as follow:
Rebuild and Reorganize all indexes within a database
If you want to REBUILD and REORGANIZE all your indexes in a database, you have to use this query: Rebuild: Reorganize:
Backup/Restore Progress
To see the progress of Backup or Restore process you can use this query: