November 16, 2022

TCPDUMP useful commands for debugging

How to Install tcpdump in Linux:

$ sudo apt-get install tcpdump  [On Debian, Ubuntu and Mint]

$ sudo yum install tcpdump           [On RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux]

$ sudo emerge -a sys-apps/tcpdump    [On Gentoo Linux]

$ sudo pacman -S tcpdump             [On Arch Linux]

$ sudo zypper install tcpdump        [On OpenSUSE]    


Useful scenarios: 

Capture Packets from Specific Interface: tcpdump -i eth0

Capture Only N Number of Packets: tcpdump -c 5 -i eth0

Print Captured Packets in ASCII: tcpdump -A -i eth0

Display Available Interfaces: tcpdump -D

Display Captured Packets in HEX and ASCII: tcpdump -XX -i eth0

Capture and Save Packets in a File: tcpdump -w 0001.pcap -i eth0

Read Captured Packets File: tcpdump -r 0001.pcap

Capture IP Address Packets: tcpdump -n -i eth0

Capture only TCP Packets: tcpdump -i eth0 tcp

Capture Packet from Specific Port: tcpdump -i eth0 port 22

Capture Packets from source IP: tcpdump -i eth0 src 192.168.0.2

Capture Packets from destination IP: tcpdump -i eth0 dst 50.116.66.139

Reference: 

https://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/,

https://www.brianstorti.com/tcp-flow-control/,

https://www.researchgate.net/figure/TCPDump-Overview-shows-the-TCP-IP-Characteristics-flow-7_fig1_326419957

Read more ...

April 26, 2022

Create New VPN entry in Cisco AnyConnect

MacBook process to add new VPN entry:


cd /opt/cisco/anyconnect/profile

sudo cp clientprofile_old.xml clientprofile_new.xml

sudo vi clientprofile_new.xml

    Update hostname and hostaddress

    Ex:

        <ServerList>

                <HostEntry>

                        <HostName>NEW</HostName>

                        <HostAddress>127.0.0.1</HostAddress>

                </HostEntry>

         </ServerList>

 

Few mac tools for easy connect Virtual Machines:

https://mobaxterm.mobatek.net/

https://apps.apple.com/us/app/zen-term-lite-ssh-client/id1422475219?mt=12

https://iterm2.com/

 

Reference:

https://documentation.meraki.com/MX/AnyConnect_on_the_MX_Appliance/Client_deployment

Read more ...

April 15, 2022

DevOps vs GitOps

DevOps is about cultural change and providing a way for development teams and operations teams to work together collaboratively. GitOps gives you tools and a framework to take DevOps practices, like collaboration, CI/CD, and version control, and apply them to infrastructure automation and application deployment.

GitOps Free Training(LinuxFoundation):

https://trainingportal.linuxfoundation.org/learn/course/introduction-to-gitops-lfs169/course-introduction/course-information 

Reference:

https://www.redhat.com/en/topics/devops/what-is-gitops#:~:text=DevOps%20is%20about%20cultural%20change,infrastructure%20automation%20and%20application%20deployment.

Read more ...

My Favorite Site's List

#update below script more than 500 posts