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 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

How to get mac-id using ipaddress in linux

Make sure you ping that IP atleast once so this can get address into ARP table. $ ping -c 1 PING ( 56(84) bytes of data.64 bytes from icmp_seq=1 ttl=128 time=4.68 ms— ping statistics —1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 4.681/4.681/4.681/0.000 ms Now user arp … Read more

Wi-Fi Initial Communication between device and access point

Following diagram shows the initial handshaking between the device ( like mobile ) and wireless access-point ( AP ) in open access mode and secured ( e.g. WPA ) mode, Authentication frame ( in open access ): 802.11 authentication is a process whereby the access point either accepts or rejects the identity of a radio … Read more

iwlist – Get detailed information from a wireless interface

Iwlist is used to display some additional information from a wireless network interface that is not displayed by iwconfig. The main argument is used to select a category of information, iwlist displays in detailed form all information related to this category, including information already shown by iwconfig Make sure your machine’s WiFi is turned on … Read more

How to Install Apache Tomcat on Ubuntu ?

apache tomcat

The Apache Tomcat® software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. Apache Tomcat software powers numerous large-scale, mission-critical web applications across a diverse range of industries and organisations. Downoad apache tomcat 8 from website , this can be downloaded as below, Now, we need … Read more

C program to read mac address using WiFi interface name

If you need to get the mac address of certain wifi interface using C program, you can use the below program. This program should work on any Linux as well as Android platforms. $ vim read_wifi_mac.c [c] #include <stdio.h> #include <stdlib.h> #include <string.h> // here our wifi interface was shown as wlp3s0, in your case … Read more