Posts

How to assign Static IP address to CentOS virtual machine through command prompt

 Step 1: Identify the Network Interface Run the following command to list all network interfaces and their current configurations: Command- ip a Identify the name of the interface for which you want to assign a static IP address (e.g., eth0, ens33, etc.). Step 2: Edit the Network Configuration File Network interfaces are configured in files located under /etc/sysconfig/network-scripts/. You need to edit the configuration file of the specific network interface. For example, if the interface is eth0, open its configuration file with: Command- sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 Step 3: Modify the Configuration In the configuration file, you need to ensure that the settings reflect the manual IP address assignment. Update or add the following lines: TYPE=Ethernet BOOTPROTO=static NAME=eth0 DEVICE=eth0 ONBOOT=yes IPADDR=192.168.1.100    # Replace with your desired IP address NETMASK=255.255.255.0    # Replace with your appropriate netmask GATEWAY=192.168.1.1      # Replace w

Reset Jenkins Admin Password

Image
  Stop Jenkins: On Linux, use sudo service jenkins stop. On Windows, stop the Jenkins service from the Services window. Access the Jenkins Home Directory: By default, the home directory is located at /var/lib/jenkins/ on Linux and %JENKINS_HOME% on Windows. Remove the config.xml for Security: In the Jenkins home directory, locate the config.xml file. Open it in a text editor and search for the <useSecurity> tag. Change the value to false: xml Copy code <useSecurity>false</useSecurity> File will look like below- Save the file and exit. Start Jenkins: Start Jenkins again (sudo service jenkins start for Linux). Jenkins should now start without asking for a login, and you can create a new user or reset the credentials. Re-enable Security: Once you've logged in and set up new credentials, go back to the config.xml file. Set <useSecurity> back to true and restart Jenkins to enable security again.

AWS Security check list

  Creating a comprehensive security checklist for AWS involves considering various aspects of security, including identity and access management, data protection, network security, monitoring, and compliance. Here's a generalized checklist to help you ensure the security of your AWS environment: 1. Identity and Access Management (IAM):    - Use IAM to manage user access to AWS services and resources.    - Follow the principle of least privilege, granting only the permissions necessary for users' roles.    - Regularly review IAM policies and roles to remove unnecessary permissions.    - Enable multi-factor authentication (MFA) for privileged accounts.    - Rotate access keys and credentials regularly. 2. Data Protection:    - Encrypt data at rest using AWS Key Management Service (KMS) or other encryption mechanisms.    - Encrypt data in transit using SSL/TLS for communication between clients and AWS services.    - Implement access controls and encryption for sensitive data store

Security Terms: XDR vs MDR

XDR (Extended Detection and Response) and MDR (Managed Detection and Response) are terms used in the field of cybersecurity, specifically in the context of threat detection and response. Let's break down each term: 1. XDR (Extended Detection and Response):    Definition: XDR is a security solution that evolved from traditional Endpoint Detection and Response (EDR) systems. It expands the scope beyond endpoints to include various security telemetry sources such as network traffic, cloud services, and email.    - Key Features:       - Cross-Layered Detection: XDR integrates and correlates data from multiple security layers, providing a more comprehensive view of potential threats. This may include endpoints, networks, emails, and cloud services.       - Analytics and Automation: XDR leverages advanced analytics and automation to identify patterns and anomalies in the collected data. It often incorporates machine learning and artificial intelligence to enhance threat detection capabil

How to enable AWS EBS Volume snapshots encryption

Using the AWS console: Sign in to AWS console and navigate to https://console.aws.amazon.com/ec2/ From the left navigation choose snapshots option. Select the actionable snapshot, choose actions. Choose the Copy Snapshot option. Check the encryption option. Under the Master key choose the kms key (It is recommended to choose KMS CMK when EBS snapshot consist of highly sensitive data). Click on copy. Once the newly encrypted snapshot is ready old snapshot should be deleted. Using AWS CLI $> aws ec2 copy-snapshot --description [description-for-new-snapshot] --destination-region [region-name] --encrypted --kms-key-id [kms-key-id] ---source-region [region-name] --source-snapshot-id [actionable-snapshot-id] Command reference: https://docs.aws.amazon.com/cli/latest/reference/ec2/copy-snapshot.html $> aws ec2 delete-snapshot --snapshot-id [actionable-snapshot-id] --region [region-name] Command reference: https://docs.aws.amazon.com/cli/latest/reference/ec2/delete-snapshot.html Note: App

How to prevent identity theft?

  Identity theft happens when anyone steals your personal information, like your name, Social Security number, or credit card info, and uses it for fraud or other criminal activities. Below are some tips to help prevent identity theft: ● Protect your personal information: Be cautious when giving out your personal information online and offline. Don't share your Social Security number, credit card number, or other sensitive information unless you trust the source and must provide it. ● Strong passwords: Strong and unique passwords for all your accounts are must. Also, avoid using the same password for multiple accounts. Use a password manager to store passwords securely. ● Monitor accounts: Frequently review your bank and credit card statements for unauthorized transactions, and check your credit report once a year for any suspicious activity. ● Phishing scams: Emails, texts, or phone calls asking for your personal information or credentials could be a scam. Avoid clicking on links

How to check SSL certificate expiration time through shell script

Image
  In this blog we will learn "How to check SSL certificate  number of days for expiration of our domain" I am going to show here in a Linux environment by using Shell script.  Create file by the name checkssl.sh - sudo nano checkssl.sh Code- Copy this code and save file. data=`echo | openssl s_client -servername $1 -connect $1:${2:-443} 2>/dev/null | openssl x509 -noout -enddate | sed -e 's#notAfter=##'` ssldate=`date -d "${data}" '+%s'` nowdate=`date '+%s'` diff="$((${ssldate}-${nowdate}))" echo $((${diff}/86400)) Output- You will get result as below