Wait for command execution till Internet is available using fping

Do you want to wait for an internet availability before proceeding further such as send an email from command line only when internet is available.. In those cases, we have to go into infinite loop of checking whether we are really connected to network. Ubuntu has a utility called “fping” we comes handy for such … Read more

Understanding ARP (Address Resolution Protocol) basics

The MAC address is how machines on a subnet communicate. When machine A sends packets to another machine on its subnet, it sends it using the MAC address. When sending a packet to a machine on the public Internet, the packet is sent to the MAC address of the router interface that is the default … Read more

How to check if Internet is available using bash script

Do you want to wait for an internet availability before proceeding further such as send an email from command line only when internet is available.. In those cases, we have to go into infinite loop of checking whether we are really connected to network. Ubuntu has a utility called “fping” we comes handy for such … Read more

Linux Initscript Example to start and stop process during booting

The below shell script uses start-stop-daemon from “/sbin/start-stop-daemon” to execute the program during booting so that the process is started boottime. In the below example, DAEMON=$PWD/helloworld.bin shows that our program is helloworld.bin and is located in current directory from where the script is executed. The above script can be executed as “bash start_daemon.sh start” to … Read more

How to identify and kill zombie process in Linux ?

If you already knows whats zombie process and wanted to identify all zombie process’s in you system, you can directly proceed ahead but if you don’t know, we may suggest you first read the article, “What is Zombie process and How to create zombie process in Linux ?” Lets consider, now you have created the … Read more

Finding list of installed files from a package in Linux

Recently we installed one package, but couldn’t understood which all files it installed on Ubuntu. You can use the command as, dpkg-query -L PACKAGE_NAME So, lets say, you want to identify which are files “openssh-server” package installed, then run the command as below, dpkg-query -L openssh-server /. /etc /etc/ufw /etc/ufw/applications.d /etc/ufw/applications.d/openssh-server /etc/pam.d /etc/pam.d/sshd /etc/init /etc/init/ssh.conf … Read more

How to disable and / or enable ICMP ping from Linux host ?

To disable the ICMP ping from certain linux host, lets say which has IP of 192.168.0.100 use below command, Type below command on the console of linux PC on which you are trying to enable / disable the ping. $ sudo iptables -A INPUT -p icmp –icmp-type any -j REJECT $ sudo iptables -A OUTPUT … Read more

Understanding wireless beacon packet ( captured using pcap API’s )

As per Wikipedia, Beacon frame is one of the management frames in IEEE 802.11 based WLANs. It contains all the information about the network. Beacon frames are transmitted periodically, they serve to announce the presence of a wireless LAN and to synchronise the members of the service set. Beacon frames are transmitted by the access point (AP) in an infrastructure basic … Read more

Understanding pcap file format – part I – Global Header

The file must begin with a Section Header Block.  Below is typical configuration, with a single Section Header that covers the whole file. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SHB v1.0 | Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Typical configuration with a single Section Header Block The Section Header Block is mandatory. It identifies the beginning of a section of the capture dump … Read more