Wednesday, July 30, 2025
Top Tech Picks of Aug 2025
Thursday, April 24, 2025
Fortigate config parser
Thursday, March 20, 2025
URL testing script and exe using python
Wednesday, February 19, 2025
JIO Plans analysis for 19-Feb-2025
Monday, February 17, 2025
Best portable HDD
best travel adaptor in 2025
Best TWS in 2025
Monday, September 4, 2023
Monday, August 28, 2023
Best Neckband 2023
Monday, August 21, 2023
Best TWS for 2023
Buy Link:
https://amzn.to/3P4OKCb
Pro:
1) can connect to laptop and mobile at same time for seamless connectivity
2) long battery life
3) compact
4) rubber tips for sound isolation and prevents from falling off from ears
5) touch controls
6) amazing sound quality
7) ANC is very much required for TWS for attending calls
cons:
1) price is bit higher than budget TWS but features offered are like premium TWS
Pro TIP:
Buy the grey or white one for lesser price, the green has a higher price.
Wednesday, November 30, 2022
Friday, October 15, 2021
Youtube Shortcut Keys:
0 = Restart video
M = Mute
F = Full Screen
J = Rev 10 sec
K= Pause/Play
L = FF 10 sec
Wednesday, September 1, 2021
interview questions
what aws services are you familiar with?
compute
database
network
storage
security
migration and transfer
encryption vs encapsulation what is difference?
Encapsulation means Wrapping or method in which data is encapsuled into a single frame.
and
Encryption is the process of transforming information using an algorithm to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key.
how is data integrity different?
Data integrity refers to the accuracy and consistency (validity) of data over its lifecycle.
DATA INTEGRITY VS. DATA SECURITY
Data security refers to the protection of data against unauthorized access or corruption and is necessary to ensure data integrity.
what is TCP three way handshake?
Syn use to initiate and establish a connection
ACK helps to confirm to the other side that it has received the SYN.
SYN-ACK is a SYN message from local device and ACK of the earlier packet.
FIN is used for terminating a connection.
what info is sent in syn message?
The packets contain a random sequence number (For example, 4321) that indicates the beginning of the sequence numbers for data that the Host X should transmit.
MTU and MSS difference?
MTU is maximum IP packet size of a given link. MSS is Maximum TCP segment size. MTU is used for fragmentation i.e packet larger than MTU is fragmented. But in case of MSS, packet larger than MSS is discarded.
MSS is normally decided in the TCP three-way handshake
why is packet fragmented?
If the packet is too big to travel in between two routing devices, it gets broken into fragments. These fragments look like IP packets in their own right and can traverse the network. They are reassembled when they reach their destination.
what is MF bit?
More fragments (MF = 1 bit) – tells if more fragments ahead of this fragment i.e. if MF = 1, more fragments are ahead of this fragment and if MF = 0, it is the last fragment.
DF bit value on Ethernet.
A DF bit is a bit within the IP header that determines whether a router is allowed to fragment a packet.
while closing TCP connection 4 steps why?
Fin-->Ack-->Fin-->Ack
How IPSEC tunnel is formed.
Step 1 Interesting traffic initiates the IPSec process—Traffic is deemed interesting when the IPSec security policy configured in the IPSec peers starts the IKE process.
Step 2 IKE phase one—IKE authenticates IPSec peers and negotiates IKE SAs during this phase, setting up a secure channel for negotiating IPSec SAs in phase two.
Step 3 IKE phase two—IKE negotiates IPSec SA parameters and sets up matching IPSec SAs in the peers.
Step 4 Data transfer—Data is transferred between IPSec peers based on the IPSec parameters and keys stored in the SA database.
Step 5 IPSec tunnel termination—IPSec SAs terminate through deletion or by timing out.
what is NAT-T in vpn? how one device know if there is a NAT device in path? on firewall how will you see there is a NAT device in path in case of NAT-T?
NAT Traversal performs two tasks:
Detects if both ends support NAT-T
Detects NAT devices along the transmission path (NAT-Discovery)
Step one occurs in ISAKMP Main Mode messages one and two. If both devices support NAT-T, then NAT-Discovery is performed in ISKAMP Main Mode messages (packets) three and four. THe NAT-D payload sent is a hash of the original IP address and port. Devices exchange two NAT-D packets, one with source IP and port, and another with destination IP and port. The receiving device recalculates the hash and compares it with the hash it received; if they don't match a NAT device exists.
If a NAT device has been determined to exist, NAT-T will change the ISAKMP transport with ISAKMP Main Mode messages five and six, at which point all ISAKMP packets change from UDP port 500 to UDP port 4500. NAT-T encapsulates the Quick Mode (IPsec Phase 2) exchange inside UDP 4500 as well. After Quick Mode completes data that gets encrypted on the IPsec Security Association is encapsulated inside UDP port 4500 as well, thus providing a port to be used in the PAT device for translation.
different kinds of NAT, why use source NAT?
static NAT: a single private IP address is mapped with single Public IP address
dynamic NAT: multiple private IP address are mapped to a pool of public IP address
PAT: This is also known as NAT overload. In this, many local (private) IP addresses can be translated to single public IP address. Port numbers are used to distinguish the traffic
what is a typical 3 tier mobile app architecture, components, security?
presentation tier: user interface
application tier: where data is processed
data tier: where the data associated with the application is stored and managed.
how is DDOS attack known in AWS infra and how to protect.
AWS Shield Standard is inbuilt and free.DDoS attacks are detected by a system that automatically baselines traffic, identifies anomalies, and, as necessary, creates mitigations
security services aws has against attacks?
AWS Shield is a managed Distributed Denial of Service (DDoS) protection service that safeguards applications running on AWS
how is ddos attack protected in any firewall.
how to mitigate large scale DDOS attack.
layer3 vs layer7 load balancer?
l3
simple, fast, efficient.
more secure as packet is not opened for inspection
uses NAT,only 1 connection betn client and server so can support max TCP connections supported by server cluster.
no smart lb based on content
sticky by nature once connection is establised with 1 server.
l7
smart routing based on URL
caching support
more expensive
required decrypting
less secure as certifiates are stored on LB which can be compromised by attacker
creates multiple connections as its proxy by nature.so you are bounded by the max TCP connection on your load balancer.
what is a http 502 error?
The HyperText Transfer Protocol (HTTP) 502 Bad Gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.
Informational responses (100–199)
Successful responses (200–299)
Redirects (300–399)
Client errors (400–499)
Server errors (500–599)
situation where you went above and beyond what you are assigned for?
what are the technology you are learning these days?
can you discuss about anytime where you helped your colleague etc?
why do you want to join XYZ company?
Thursday, February 13, 2020
Cisco automation
1. Download plinkx86 app from internet
2. Browse windows cli to folder where plinkx86 is downloaded
3. Run below command
Plinkx86 -ssh -l USERNAME -pw PASSWORD DEVICE IP "COMMAND" >> output.txt
Create similar command for other cisco commmand and run it one by one to get all the outputs
Note: replace
USERNAME with username to login with eg admin
PASSWORD with user password
DEVICE IP with actual device ip or hostname
COMMAND with cisco command eg: "sh int status"
You can also connect with telnet protocol instead of ssh for older devices
Thursday, September 12, 2019
Ansible Installation and basic commands
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
/etc/ansible/hosts --> ansible host inventory and format
[group name 1]
ip address/hostname
[group name 2]
ip address/hostname
Basic commands
ansible all -m ping
ansible [group name] -m command -a "ls" --> ping all hosts in group
ansible -i inventory all -m command -a 'iptables -F" --become--ask-become-pass --> flush iptables rules for all hosts in inventory
ansible all -m setup -->capture info of all hosts
ansible-doc setup -->extract facts from documents setup
Monday, April 8, 2019
create f5 ltm virtual pool node using tmsh with input from csv
$outputFile = "C:\path\ltm_output.txt"
$i=1
Import-Csv $inputCSV | ForEach-Object {
$policy = $_.policy
if ($i -eq 1)
{
Add-Content -PassThru $outputFile -Value "modify ltm policy $policy create-draft"
}
$i++
}
Import-Csv $inputCSV | ForEach-Object {
$vipportno = $_.vipportno
$poolportno1 = $_.poolportno1
$poolportno2 = $_.poolportno2
$poolportno3 = $_.poolportno3
$appname = $_.appname
$nodeip1 = $_.nodeip1
$nodeip2 = $_.nodeip2
$nodeip3 = $_.nodeip3
$vipip = $_.vipip
$poolmember1 = $_.nodeip1 + ":"+ $_.poolportno1
$poolmember2 = $_.nodeip2 + ":"+ $_.poolportno2
$poolmember3 = $_.nodeip3 + ":"+ $_.poolportno3
$fullappname = $_.vipip + ":" + $_.vipportno
$vsname = $_.appname + "-" + $_.vipportno
$url = $_.url
$monitor = $_.monitor
$persistance = $_.persistance
$policy = $_.policy
Add-Content -Path $outputFile -Value "create ltm node $nodeip1 fqdn { autopopulate enabled interval ttl name $nodeip1.company.com }"
Add-Content -Path $outputFile -Value "create ltm node $nodeip2 fqdn { autopopulate enabled interval ttl name $nodeip2.company.com }"
Add-Content -Path $outputFile -Value "create ltm node $nodeip3 fqdn { autopopulate enabled interval ttl name $nodeip3.company.com }"
Add-Content -Path $outputFile -Value "create ltm pool pl-$appname members add { $poolmember1 $poolmember2 $poolmember3 } monitor $monitor"
Add-Content -Path $outputFile -Value "create ltm virtual vs-$vsname destination $fullappname profiles add { wilcard-company company-program-http serverssl-insecure-compatible } pool pl-$appname description $url source-address-translation { pool Internal_SNAT } translate-address enabled vlans-enabled vlans add { External } persist replace-all-with { $persistance } source-address-translation { type snat }"
Add-Content -Path $outputFile -Value "modify ltm policy /Common/Drafts/$policy rules add { rl-$appname { actions add { 0 { forward select virtual /Common/vs-$vsname } } conditions add { 0 { http-host host values {$url} } } description $url } }"
}
Add-Content -PassThru $outputFile -Value "publish ltm policy /Common/Drafts/$policy"
Add-Content -PassThru $outputFile -Value "save sys config"
create a csv file named ltm-input.csv with columns as per the variables called
| |||||||||||||||||||||||||||||||||
Thursday, March 28, 2019
create f5 vip pool node from tmsh shell
Tuesday, November 20, 2018
Address object creation script for fortigate using powershell
do not change the column names as they are refereed in the script
| Assetname | IPAddress |
| ad-(ip address) | (Ip address) |
2. Create a notepad file and copy the below test and save it as script.ps1
$inputCSV = "c:\Servers.csv" $outputFile = "c:\Addresses.txt" Add-Content -PassThru $outputFile -Value "config firewall address" Import-Csv $inputCSV | ForEach-Object { $Name = $_.Assetname $IP = $_.IPAddress Add-Content -Path $outputFile -Value "edit $Name" Add-Content -Path $outputFile -Value "set subnet $IP 255.255.255.255" Add-Content -Path $outputFile -Value "next" } Add-Content -PassThru $outputFile -Value "end"
| 3. Save the Servers.csv and script.ps1 files in C: on machine | |||||||
| 4. open power shell and goto c drive and run .\script.ps1 |
Monday, May 7, 2018
F5 irules
when HTTP_REQUEST {
if { [HTTP::host] equals "www.xyz.com" } {
HTTP::respond 301 Location "https://www.xyz.com"
}
}
to select different ssl profile based on source IP
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals clientIPList ]} {
log local0. "MATCH! Profile client-ssl-profile selected for [IP::client_addr]"
SSL::profile client-ssl-profile
} else {
#log local0. "Profile clientssl selected for [IP::client_addr]"
SSL::profile wilcard-company
}
}
irule to respond 200 ok without any pool
when HTTP_REQUEST {
if { ( [IP::addr [IP::client_addr] equals 10.0.0.0/8] ) or ( [IP::addr [IP::client_addr] equals 172.16.0.0/12] ) or ( [IP::addr [IP::client_addr] equals 192.168.0.0/16] )} {
HTTP::respond 200 content "Connection" "ok"
}
}
HTTP URI path based redirection for multiple URI
when HTTP_REQUEST {
if { [HTTP::host] equals "www.company.com" } {
switch -glob [HTTP::uri] {
"/about-ie/newsroom/trials-medical-panel*" {
HTTP::respond 301 Location "https://www.company.com/news-and-stories"
}
"/about-/newsroom/customer-improvements-move-next-stage*" {
HTTP::respond 301 Location "https://www.company.com/news-and-stories"
}
"/about/profile/vivek-bhatia*" {
HTTP::respond 301 Location "https://www.company.com/about-us/our-people/our-group-leadership-teama"
}
URI path redirection to different pool
when HTTP_REQUEST {
if {
[string tolower [HTTP::uri]] contains "/scim1450" }
{
HTTP::uri [string map -nocase {"/SCIM1450/" "/"} [HTTP::uri]]
pool pl-SCIM1450}
elseif {
[string tolower [HTTP::uri]] contains "/scim1451" }
{
HTTP::uri [string map -nocase {"/SCIM1451/" "/"} [HTTP::uri]]
pool pl-SCIM1451}
Display maintenance page if all pools members are down or disabled.
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 }
{ set http_reply "You have reached [HTTP::host],
Our website is offline while we make some important updates. Please check back again soon.
Please contact helpdesk if you continue to experience issues after this maintenance window."
HTTP::respond 200 content $http_reply
}
}
use maintenance page uploaded to f5 ifile with name maintenance-page
when HTTP_REQUEST {
if {[active_members [LB::server pool]] < 1} {
switch [HTTP::uri] {
default {HTTP::respond 200 content [ifile get "maintenance-page.html"] }
}
}
}
Friday, March 9, 2018
F5 UCS backup to FTP script
#
# This script automates LTM Backups and saves the files with hostname and date
# off to an FTP server
# version 1.0
# Author: Yusuf
# Original Date: 03/09/18
#save this file to /etc/cron.daily for daily backup
#remember to change permission to read/write/execute using
#chmod 777
tmsh save /sys ucs /var/tmp/BIG-IP_backup
export a='date +"%y%m%d"'
export aa=$HOSTNAME.$a.ucs
export b=/var/tmp/$aa
mv /var/tmp/BIG-IP_backup.ucs $b
tar -cf /var/tmp/certs.tar /config/ssl
export ff=$HOSTNAME.$a.certs.tar
export f=/var/tmp/$ff
mv /var/tmp/certs.tar $f
export c=$HOSTNAME.$a.crontab
export cc=/var/tmp/$c
cp /etc/crontab $cc
export MName=
export Log=/var/tmp/log.bigip
export UserName=
export UserPassword=
export Machine1f2=$aa
export Machine1f3=$c
export Machine1f4=$ff
ftp -nvd ${MName} <&2 > ${Log}
user ${UserName} ${UserPassword}
bin
put ${b} ${Machine1f2}
put ${cc} ${Machine1f3}
put ${f} ${Machine1f4}
quit
END
rm -f ${b}
rm -f ${cc}
rm -f ${f}
RTN_CODE=$?
exit $RTN_CODE

