Category: computer networks

Show elapsed (round-trip) time of packets.

$fping -e www.gnu.org www.gnu.org is alive (301 ms) $fping -e www.gnu.org www.gnu.org is alive (302 ms) $fping -e www.rajagiritech.edu.in www.rajagiritech.edu.in is alive (62.2 ms) $fping www.gnu.org www.gnu.org is alive $ping www.gnu.org PING wildebeest.gnu.org (208.118.235.148) 56(84) bytes of data. 64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=1 ttl=49 time=302 ms 64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=2 ttl=49 time=301

Installing dig command on Debian

$sudo apt-get install -y dnsutils Reading package lists… Done Building dependency tree Reading state information… Done The following packages were automatically installed and are no longer required: libcaribou-gtk-module libcaribou-gtk3-module libebur128-1 libevent-2.0-5 libgdict-1.0-10 libgdict-common libgmime-2.6-0 libgnome-autoar-common libgom-1.0-common libjavascriptcoregtk-3.0-0 libnotmuch4 libpcre16-3 libperl5.24 libraw15 libsexy2 libwebkitgtk-3.0-0 libwebpmux2 python-olefile rename tcpd Use ‘sudo apt autoremove’ to remove them. The

finding the current state of a network cable

$sudo cat /sys/class/net/eth0/speed 100 $sudo cat /sys/class/net/eth0/ca carrier carrier_changes $sudo cat /sys/class/net/eth0/carrier 1 $sudo cat /sys/class/net/eth0/carrier_changes 2 $sudo cat /sys/class/net/eth0/operstate up $sudo ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full

httping with sending of username and password and flood ping

$httping -U www.beautifulwork.org No URL/host to ping given $httping -U http://www.beautifulwork.org No URL/host to ping given $httping http://www.beautifulwork.org PING www.beautifulwork.org:80 (/): connected to 89.36.208.169:80 (224 bytes), seq=0 time=455.10 ms connected to 89.36.208.169:80 (224 bytes), seq=1 time=458.34 ms connected to 89.36.208.169:80 (224 bytes), seq=2 time=447.45 ms ^CGot signal 2 — http://www.beautifulwork.org/ ping statistics — 4 connects,

A typical hack with strace command which traces a ping command

ABOUT strace strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace. TYPICAL strace

sample session with “ss” command to show details on network

$ss -t State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 192.168.0.100:57982 216.58.197.34:https ESTAB 0 0 192.168.0.100:56572 216.58.196.98:https ESTAB 0 0 192.168.0.100:51440 216.58.220.34:https ESTAB 0 0 192.168.0.100:56850 216.58.196.110:https ESTAB 0 0 192.168.0.100:42946 216.58.220.46:https ESTAB 0 0 192.168.0.100:42758 216.58.197.46:https ESTAB 0 0 192.168.0.100:32912 216.58.220.33:https ESTAB 0 0 192.168.0.100:40452 216.58.220.38:https ESTAB 0 0 192.168.0.100:51128 182.79.251.80:https ESTAB

Capturing TCP Flags with tcpdump. Capture all ACK packets

ABOUT TCP FLAGS They are control bits that indicate different connection states or information about how a packet should be handled. FLAGS CWR – Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set (added to header by RFC 3168). ECE

Hacking with debian netselect-apt command

$sudo netselect-apt -t 2 -c IN Using distribution stable. Retrieving the list of mirrors from www.debian.org… –2014-08-31 23:00:07– http://www.debian.org/mirror/mirrors_full Resolving www.debian.org (www.debian.org)… 140.211.15.34, 128.31.0.51 Connecting to www.debian.org (www.debian.org)|140.211.15.34|:80… connected. HTTP request sent, awaiting response… 200 OK Length: 350858 (343K) Saving to: ‘/tmp/netselect-apt.Pjgwxz’ 100%[====================================================================================>] 3,50,858 110KB/s in 3.1s 2014-08-31 23:00:11 (110 KB/s) – ‘/tmp/netselect-apt.Pjgwxz’ saved [350858/350858]

Tinkering with the fping command

$fping 192.168.0.1 192.168.0.1 is alive $fping 192.168.0.2 ICMP Host Unreachable from 192.168.0.103 for ICMP Echo sent to 192.168.0.2 ICMP Host Unreachable from 192.168.0.103 for ICMP Echo sent to 192.168.0.2 ICMP Host Unreachable from 192.168.0.103 for ICMP Echo sent to 192.168.0.2 ICMP Host Unreachable from 192.168.0.103 for ICMP Echo sent to 192.168.0.2 192.168.0.2 is unreachable $fping