Posts

OPA : Open Policy Agent

Image
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  OPA Agent for Terraform security https://www.openpolicyagent.org/docs/latest/terraform/   https://www.youtube.com/watch?v=deu-BpE1L98&t=69s ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  OPA :   which is why Open Policy Agent can really come handy . 

IP Cutover

Image
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IP Cutover is needed when the Base machine is CentOS-6 and the VM is CentOS-7 Lets consider this server running in CentOS 6 ,and now the application team is asking to cut-over , they will come to us for the cut over when we have the new and the old server ready . netutils02-eq This IP is reachable from our work station. We will need to disable the IP address in this server and enable the IP address in another server new server . We need to shutdown the interface first . $ /sbin/ifdown ens192 Before that we need to go to checkMK and make sure this server is configured for downtime . The two servers will have different IP addresses though they might be running in the same network. once the interface is down we will not be able to ping this IP address from our workstation.  Once after checking the checkMK if the server CentOS is ...

Terraform -- Notification service

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  # This resource provides the Notification Topic resource in Oracle Cloud Infrastructure Notifications service. resource "oci_ons_notification_topic" "test_notification_topic" {     #Required     compartment_id = var.compartment_id     name = var.notification_topic_name     #Optional     #defined_tags = {"Operations.CostCenter"= "42"}     description = var.notification_topic_description     freeform_tags = {"Department"= var.compartment_name} } # This resource provides the Subscription resource in Oracle Cloud Infrastructure Notifications service. resource "oci_ons_subscription" "test_subscription" {     #Required     compartment_id = var.compartment_id     endpoint = var.subscription_endpoint     protocol = var.subscription...

FINAL ROOT -LOGIN FAILURE -SUCCESSFUL ONE - SPIDERMAN

#!/bin/bash # Server Tested : compute90-cc : 8.25.218.59 10.170.16.186 : compute90-cc.packet8-pilot.net :ssobeta04-cc : capture_root_logging_failures.sh #####   --  Author of Script  - Sreejith Balakrishnan    #####       Purpose : 1. This script capture failed logins for root users whoever fails to connect successfully in their first 5 attempts  #####                 2. And only if those 5 failed attempts happens within 15 min timeline -- In such cases logs are generated #set -x ###----------------- ##### Declarations : ###----------------- #####   --  Put in the number of Failed Login Attempts you want to capture attempted_counts=5 #####   --  Time in seconds within which the count of login attempts(attempted_counts) to be captured seconds=900 ###------------------------ ##### End of Declations : ###------------------------ root_login(){ #rm -Rf /tmp/logins...

ROOT-OTHER CONDITIONS

###  time_check.sh convert_time_seconds() { #!/bin/bash rm -Rf /tmp/timechecker.log rm -Rf /tmp/time_of_logins.log rm -Rf /tmp/time_to_seconds.log cat /tmp/LOGIN_FAILED_ROOT.log | awk '{print $7}' >>  /tmp/time_of_logins.log cat /tmp/time_of_logins.log | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }' > /tmp/time_to_seconds.log cat /tmp/time_to_seconds.log times_count=`cat /tmp/time_to_seconds.log  | wc -l` echo " " echo "-----------------------------------------------------------------" echo "Total Number of Failed login attempts by Root User : $times_count" echo "-----------------------------------------------------------------" echo " " } convert_time_seconds #### Second Script -----------Creating Variables equal to the count of inputs in seconds--------------------------------- ###  create_variables.sh create_variables() { #!/bin/bash  rm -Rf /tmp/variables.log in_seconds=`wc -l < /tmp/time_to_seconds.lo...

FIRST-SUCCESSFUL SCRIPT -- NEEDED EDITION -- FIRST SUCCESSFUL ONE

#!/bin/bash # Server Tested : compute90-cc : 8.25.218.59 10.170.16.186 : compute90-cc.packet8-pilot.net #####   --  Author of Script  - Sreejith Balakrishnan    #####       Purpose : 1. This script capture failed logins for root users whoever fails to connect successfully in their first 5 attempts  #####                 2. And only if those 5 failed attempts happens within 15 min timeline -- In such cases logs are generated #set -x ###----------------- ##### Declarations : ###----------------- #####   --  Put in the number of Failed Login Attempts you want to capture attempted_counts=5 #####   --  Time in minutes within which the count of login attempts to be captured seconds=900 ###------------------------ ##### End of Declations : ###------------------------ root_login(){ #rm -Rf /tmp/logins_1.log #rm -Rf /tmp/logins_2.log #rm -Rf /tmp/logins_11.log #rm -Rf...