Step:1 – Deny all hosts deny all incoming SSH connections Open file /etc/hosts.deny by using a text editor:  vi /etc/hosts.deny Add the following line to deny all incoming SSH connections to the server:  sshd: ALL Save and close the file. Step:2 – Allow IP Address Open the file /etc/hosts.allow file by using a text… Continue Reading Restrict SSH login to a specific IP or host

Sometimes we may delete the cPanel account accidentally. May be we will be having the backups enabled but still inorder to get the latest backup before termination, you can use the below script. Go to the below path/usr/local/cpanel/scripts Create a file with name “prekillacct”vi prekillacct Install AWS CLI in the… Continue Reading Script to backup the cPanel account to S3 before the termination

Please find the below steps to monitor the website using status codes. Nagios supports monitoring the website using status coodes and there is a command in /etc/nagios-plugins/config/http.cfg . Example:- We can use a command like below to monitor a URL like https://domain1.com. define command{ command_name check_https_url command_line /usr/local/nagios/libexec/check_http -H domain1.com… Continue Reading Monitoring website using status codes on Nagios

Please find the below steps in configuring the SMTP Gsuite relay service: 1) Disable 2 factor. You can check the below link to disable the 2factor. https://support.google.com/accounts/answer/185833?hl=en 2) Turn on Less secure apps. Please find the below link to turn on.https://myaccount.google.com/u/1/lesssecureapps 3) Sign-in to you google admin console using administrator… Continue Reading Mail Configuration using the SMTP Gsuite relay service

Follow the below steps to enable ACME challenge mkdir .well-known unde var/www/example.com(document root) mkdir acme-challenge under .well-known create file test.txt under acme-challenge goto /etc/nginx/sites-avaialble/example.com and add the below lines You can see the example below.

How To Add DNS Record In AWS Lightsail Date : 24-10-2020 Step : 1 Login to your AWS account. Step : 2 Select lightsail option. Step : 3 Select networking option. Step : 4 Choose the domain you want to add DNS records. Step : 5 Click add record option.… Continue Reading How To Add DNS Record In AWS Lightsail

Please find the below steps of send mail configuration. 1) Install Sendmail with the below command.apt-get install sendmail sendmail-cf2) Please check for saslauthd service, if it is not there on the server then install it with the below command.apt-get install sasl2-bin3) Go to vim /etc/default/saslauthd and keep “start=yes”(by default it… Continue Reading Sendmail Configuration – SMTP relay with port 587

THE WALRUS OPERATOR IN PYTHON 3.8 Date: 29/01/2020 Introduction Walrus Operator is another name for Assignment Expressions. I will explain in detail in this article. Assignment Expressions are written with a new notation which is colon followed by equal to expression ( := ) . It allows you to assign… Continue Reading THE WALRUS OPERATOR IN PYTHON 3.8

HOW TO PASS TWO OR MORE LISTS IN FOR LOOP USING PYTHON Date: 07/12/2019 Introduction Python has global built-ins that are handy for a regular problem. Specifically, I will explain zip() in this article. Let’s take an example from Avengers, Have to match the list of Avengers characters with the… Continue Reading HOW TO PASS TWO OR MORE LISTS IN FOR LOOP USING PYTHON

How to install Python from source code Here, let us see how to install any python version from source code. Step 1: First, in order to get your python source file, go to the link, https://www.python.org/ftp/python/ and select the python version which you want to get installed. For example, if… Continue Reading How to install Python from source code