DISM /online /Set-Edition:ServerStandard /ProductKey:HBNP2-Q32Q2-XQBPR-FK4XX-QV9YB /AcceptEula
The Windows & Networking Diary
Monday, 21 September 2026
Thursday, 6 August 2026
Reusable Template Script for Any Windows Server-Ransomware-Protection
# ==============================================================================
# Script: Configure-TallyRansomware-Selvamani.ps1
# Target Data Path: E:\TallyPrimeSelvamani\data
# Target Executable: E:\TallyPrimeSelvamani\tally.exe
# ==============================================================================
# 1. Define Exact Paths
$TallyDataPath = "E:\TallyPrimeSelvamani\data"
$TallyExePath = "E:\TallyPrimeSelvamani\tally.exe"
$ErrorActionPreference = "Stop"
Write-Host "====================================================" -ForegroundColor Cyan
Write-Host " Configuring Protection & Performance for Tally " -ForegroundColor Cyan
Write-Host "====================================================" -ForegroundColor Cyan
# 2. Add Data Folder to Ransomware Shield (Protected Folders)
if (Test-Path -Path $TallyDataPath) {
Write-Host "[+] Adding Protected Data Folder: $TallyDataPath" -ForegroundColor Yellow
Add-MpPreference -ControlledFolderAccessProtectedFolders $TallyDataPath
Write-Host " Successfully added protected folder." -ForegroundColor Green
} else {
Write-Host "[!] Warning: Folder '$TallyDataPath' not found. Please verify directory name." -ForegroundColor Red
}
# 3. Whitelist tally.exe (Allow Application through CFA)
if (Test-Path -Path $TallyExePath) {
Write-Host "`n[+] Whitelisting Executable: $TallyExePath" -ForegroundColor Yellow
Add-MpPreference -ControlledFolderAccessAllowedApplications $TallyExePath
Write-Host " Allowed executable successfully." -ForegroundColor Green
} else {
Write-Host "[!] Warning: Executable '$TallyExePath' not found. If installed elsewhere, adjust path." -ForegroundColor Red
}
# 4. Add Defender Performance Exclusions (Prevents network scanning lag)
Write-Host "`n[+] Adding Performance Exclusions..." -ForegroundColor Yellow
Add-MpPreference -ExclusionProcess "tally.exe"
if (Test-Path -Path $TallyDataPath) {
Add-MpPreference -ExclusionPath $TallyDataPath
}
Add-MpPreference -ExclusionExtension ".tsf"
Add-MpPreference -ExclusionExtension ".900"
Write-Host " Performance exclusions configured successfully." -ForegroundColor Green
# 5. Enable Controlled Folder Access (Audit Mode First)
# Options: "AuditMode" (Safe testing) or "Enabled" (Immediate enforcement)
$DesiredMode = "AuditMode"
Write-Host "`n[+] Setting Controlled Folder Access Mode to: $DesiredMode" -ForegroundColor Yellow
Set-MpPreference -EnableControlledFolderAccess $DesiredMode
Write-Host " CFA mode updated." -ForegroundColor Green
# 6. Verify Settings
Write-Host "`n====================================================" -ForegroundColor Cyan
Write-Host " Current Controlled Folder Access Summary " -ForegroundColor Cyan
Write-Host "====================================================" -ForegroundColor Cyan
$mpPrefs = Get-MpPreference
Write-Host "CFA Mode : " -NoNewline
switch ($mpPrefs.EnableControlledFolderAccess) {
0 { Write-Host "Disabled (0)" -ForegroundColor Red }
1 { Write-Host "Enabled / Active Blocking (1)" -ForegroundColor Green }
2 { Write-Host "Audit Mode Only (2)" -ForegroundColor Yellow }
}
Write-Host "`nProtected Folders:" -ForegroundColor Cyan
$mpPrefs.ControlledFolderAccessProtectedFolders | Where-Object { $_ -like "*Selvamani*" } | ForEach-Object { Write-Host " - $_" -ForegroundColor White }
Write-Host "`nAllowed Applications:" -ForegroundColor Cyan
$mpPrefs.ControlledFolderAccessAllowedApplications | Where-Object { $_ -like "*tally*" } | ForEach-Object { Write-Host " - $_" -ForegroundColor White }
Write-Host "`nConfiguration complete!" -ForegroundColor Green
Wednesday, 29 July 2026
Deleting a Protected Recovery Partition Using DiskPart
1. Overview
DiskPart command-line utility.2. Prerequisites & Safety Warning
[!CAUTION]
Data Loss Risk: TheDiskParttool permanently alters your drive structure. Selecting the wrong disk or partition can lead to irreversible data loss. Double-check all indexes before executing commands.
- Administrative privileges on the host system are required.
- Ensure backups of critical data are completed before proceeding.
DiskPart successfully deleted the selected partition.Tuesday, 7 April 2026
AWS Client VPN Endpoint Setup
Here's the high-level workflow :
➤ First, we generate certificates using EasyRSA.
➤ Then, we upload the server and client certificates AWS Certificate Manager.
➤ Next, we create a Client VPN Endpoint inside our VPC.
➤ After that, we associate it with our private subnet and set authorization rules.
➤ Finally, we connect from our laptop using the AWS VPN Client.
Step 1 - Create VPC & Subnet
➤ Open the VPC Console
➤ Create a VPC with CIDR 10.0.0.0/16
➤ Add a private subnet 10.0.1.0/24
➤ No Internet Gateway needed
Step 2 - Launch Private EC2 Instance
➤ Go to EC2 Console → Launch Instance ➤ Choose Amazon Linux 2 (or Ubuntu)
➤ Place the EC2 inside the private subnet
➤ Do not assign a public IP
➤ Attach a Security Group allowing SSH (port 22), but only from your VPN CIDR later
Step 3 - Generate Certificates
➤ Download EasyRSA from GitHub and extract it. https://github.com/OpenVPN/easy-rsa/releases/download/v3.2.2/EasyRSA-3.2.2-win64.zip
Refer the link - https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/client-auth-mutual-enable.html
➤ Open CMD run as Administrator and enter into the EasyRSA folder
➤ Generates:
- Certificate Authority (CA)
- Server certificate and key
- Client certificate and key
Please download the cert file I created and updated in my own Google Drive, and make use of it.
https://drive.google.com/drive/folders/1O9R4AEktbDU5Ae1HFczbPiPVQolQB1xO?usp=sharing
Step 4 - Upload Certificates to AWS
Go to AWS Management Console →→ Certificate Manager
➤ Upload server certificate (CA, public cert, and private key)
➤ Upload client certificate
➤ Copy the ARN values for later use
Step 5 – Create the Client VPN Endpoint
Go to VPC → Client VPN Endpoints → Create
➤ Select the server certificate ARN
➤ Set client CIDR range, e.g., 10.100.0.0/22
➤ Enable Split-tunnel if desired
After creation :
➤ Add authorization rule to allow VPC CIDR 10.0.0.0/16
➤ Associate VPN Endpoint with private subnet
Step 6 - Download Configuration and Connect
➤ Download the .ovpn configuration file ➤ Embed client certificates inside the file. ➤ Open SSH from EC2 to 10.100.0.0/22
Open AWS VPN Client on your laptop Import configuration and click Connect
Monday, 29 September 2025
Saturday, 26 July 2025
AWS
We need to understand the following concept .
1. VPC
2. Subnets
3. Internet Gateway
4. Route table
5. Security group
6. Ec2
7. Nat Gateway.
Steps to create and set up a VPC in AWS:
1. create a own vpc
2. create a public and private subnet for different Availability zone by assigning CIDR blocks.
3. Create Internet Gateway and attach it to the Vpc.
4. Create two Routing Table one as Public and one as private by associating the appropriate subnets to it.
5. Edit the Public route Table's Route alone and map the Internet Gateway, not the Private one and leave it as it is.
6. Create two security groups- one for public and one for private then edit the public security group's inbound rules with RDP, HTTP, HTTPS, SSH and map 0.0.0.0/0 in the source, And then for private security group edit the inbound rules and map the Security group of public in the source.
7. Create two Ec2's one in public and one in private subnets with proper security groups.
8. Login into the public Ec2 instance and check whether it is getting internet connection.
9. Create NAT gateway with new elastic IP for the internet connection in the privat subnet. then Map it to Private Routing table
10. Now login to the private ec2 and verify the connectivity and internet facility.
ASG- Auto Scaling Group
It is a storage unit.
Thursday, 13 October 2022
Docker and kubernetes
Docker Containerization
Virtualization Vs Containerization
Advantages of Containerization
Containers are isolated, don't require an operating system, and share a host kernel. so containers run on the same server and use the same resource. they do not interact with each other because its isolated, if one application crashes, other containers with the same application will keep running without any issues.It's a portable and lightweight operating system and it contains only the required binaries, dependencies, and libraries to run the application. so it can be moved anywhere easily and run without worrying about compatibility, or dependencies kind of issue.faster and resource efficient it's very fast to boot because containers are lightweight and start in less than a second since they do not require an operating system boot.improving scalability and lower costs by allowing more containers in the environment without the need for more servers, containerization increases scalability anywhere from 10 to 100 times that of traditional VM environments.
Introduction to Docker - What is Docker on Containers
Docker Architecture and Components
Docker Installation
A few quick notes about Docker:docker-installation-on-ubuntu-article
Multiple containers run on the same hardware
Maintains isolated applications
Enables high productivity
Quick and easy to configure
Before learning about this technology, the first step is to install it. In this article, you’ll learn how to install Docker on Ubuntu.
Ubuntu:
CentOS/RHEL:
Open the terminal on Ubuntu.
sudo apt-get install docker.io
sudo systemctl status docker
Necessary comment to operate docker.
sudo docker search httpd
sudo docker pull httpd
sudo docker pull docker.io/exasol/nagios-monitoring
sudo docker images
sudo docker rmi "image id" ( to remove images)
sudo docker system df
sudo docker ps
sudo docker run -d -it --name web httpd
sudo docker exec -it web /bin/bash
sudo docker run -d -it --name web -p 80:80 httpd
sudo docker stop web
sudo docker stats web
sudo docker events
sudo docker rm web
sudo docker rm -f web
sudo docker top web
sudo docker save imange id > https-backup.tar (to take image as backup)
scp https-backup.tar ranjith@192.168.2.133:/home/ranjith/ (for SCP)
sudo docker load -i https-backup.tar ( it will load the image from local not in internet)
sudo docker commit "container Id" ( it will commit the image)
sudo docker commit d16a51d08814 customimage:2.1 (to add tag for commited images)
sudo docker run -d -it --name test1 customimage:2.1 /bin/sh ( to login custome image)
sudo docker exec -it 0b4a4fca58d6 /bin/bash ( to exec the custome image and verify)
sudo docker network inspect ff8866d57f1d
sudo docker network ls
ip a
sudo docker port web5
Docker run -i -t centos (to mount os)
docker cp aaca4f3bedb6:/opt/nagios/etc/ /root/Desktop
docker cp /root/Desktop/etc/nagios.cfg aaca4f3bedb6:/opt/nagios/etc/

.png)
.png)
