In general, for each command in linux shell one can use: "man " and "info " to get manuals / usage instructions "command --help" to get short usage instructions "info command" to get usage instructions *********** 1. Ping *********** Window$: ping <-t> host *nix:ping host use "man ping" and "info ping" to see manual for ping command which explains * its numerous options. Examples: Simple ping: ping 10.252.254.250 PING 10.252.254.250 (10.252.254.250) 56(84) bytes of data. 64 bytes from 10.252.254.250: icmp_seq=1 ttl=60 time=20.0 ms 64 bytes from 10.252.254.250: icmp_seq=2 ttl=60 time=20.0 ms 64 bytes from 10.252.254.250: icmp_seq=3 ttl=60 time=25.6 ms ^C --- 10.252.254.250 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2437ms rtt min/avg/max/mdev = 20.049/21.920/25.634/2.628 ms Reverse Route: ping -R 10.252.254.250 PING 10.252.254.250 (10.252.254.250) 56(124) bytes of data. 64 bytes from 10.252.254.250: icmp_seq=1 ttl=60 time=45.4 ms RR: 41.189.93.108 41.66.151.213 10.110.1.89 10.252.254.250 10.252.254.250 10.110.1.86 10.110.1.90 41.66.151.209 41.189.93.97 64 bytes from 10.252.254.250: icmp_seq=2 ttl=60 time=20.9 ms (same route) 64 bytes from 10.252.254.250: icmp_seq=3 ttl=60 time=21.2 ms (same route) 64 bytes from 10.252.254.250: icmp_seq=4 ttl=60 time=21.3 ms (same route) ************** 2. Traceroute ************** traceroute - print the route packets trace to network host Window$: tracert host *nix: traceroute host + (^C) to quit execution! example check SSH,Telnet and FTP access $ cat < /dev/tcp/10.105.111.171/22 SSH-2.0-ROSSSH ^C $ cat < /dev/tcp/10.105.111.171/23 ���� ��#��'^C $ cat < /dev/tcp/10.105.111.171/21 220 test-board FTP server (MikroTik 6.27) ready ^C Example test SMTP: $ cat < /dev/tcp/relay1.domain.net/25 220 relay1.domain.net ESMTP Exim 4.63 Sun, 26 Jul 2015 11:39:50 +0200 ^C **************************** 7. Terminal Emulators **************************** Window$: Terra Term, putty *nix: as preffered, many available Tera Term (rarely TeraTerm) is an open-source, free, software implemented, terminal emulator (communications) program Terra Term http://ttssh2.osdn.jp/index.html.en PuTTY is a free and open-source terminal emulator, serial console and network file transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. It can also connect to a serial port (since version 0.59). PUTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/ ************************************** 8. FTP/Secure Copy - File Transfer ************************************** Window$: winscp Linux: mc, scp, ... WinSCP (Window$ Secure CoPy) is a free and open-source SFTP, FTP, WebDAV and SCP client for Micro$oft Window$. WinSCP http://winscp.net/eng/index.php WinSCP Documentation http://winscp.net/eng/docs/start 9. mtr/WinMTR mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool. Window$: WinMTR http://winmtr.net/ *nix: mtr manual can be obtained with "man mtr" and is very useful example: mtr -n -t 10.105.116.163 My traceroute [v0.85] local (0.0.0.0) Mon Jul 27 10:23:59 2015 Keys: Help Display mode Restart statistics Order of fields quit Packets Pings Host Loss% Snt Last Avg Best Wrst StDev 1. 172.28.10.1 0.0% 12 1.9 3.3 1.6 15.8 3.9 2. 172.31.254.254 0.0% 12 0.2 1.3 0.2 12.8 3.6 3. 10.255.0.5 0.0% 12 1.5 8.1 1.5 30.7 11.9 4. 10.255.0.6 0.0% 12 37.0 5.9 1.5 37.0 10.8 5. 10.105.116.161 0.0% 12 2.9 3.3 2.9 5.3 0.5 6. 10.105.116.163 0.0% 11 11.5 9.5 8.3 11.5 0.6 *********************** 10. Nmap/Zenmap ************************* To test for open ports on remote host and network Nmap ("Network Mapper") is a free and open source (license) utility for network discovery and security auditing. It is as efficient port scanner. Window$ and Linux https://nmap.org/download.html http://nmap.org/book/man-port-scanning-basics.html **************************** 11. hping **************************** hping3 - send (almost) arbitrary TCP/IP packets to network hosts Each attempt to establish a TCP connection to the remote host must be responded with either by accepting the connection or refusing the connection by sending a RST package. This information is more than enough to confirm the presence of the host. TCP Ping Window$ .exe http://www.elifulkerson.com/projects/tcping.php linux hping3 ,(tcpping rpmforge) please see "man hping3" and official website http://www.hping.org/hping3.html http://wiki.hping.org/ Window$ hping2 http://www.hping.org/download.html If ICMP has been disabled (security by obscurity) one can use TCP protocol to check is host alive. Below two methods are often used to establish online availability of some host, whenever PING (or ICMP protocol) has been disabled or blocked. - Establish TCP connection to, well known publicly available ports like - http,ftp,ssh etc. - Receive connection refused error with a RST package on initial ACK - packet without connection already established. Examples: Set SYN tcp flag hping3 -S -p 80 10.105.100.42 HPING 10.105.100.42 (eth0 10.105.100.42): S set, 40 headers + 0 data bytes len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=SA seq=0 win=14600 rtt=8.5 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=SA seq=1 win=14600 rtt=7.7 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=SA seq=2 win=14600 rtt=7.7 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=SA seq=3 win=14600 rtt=8.4 ms ^C --- 10.105.100.42 hping statistic --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 7.7/8.1/8.5 ms Set ACK tcp flag. hping3 -A -p 80 10.105.100.42 HPING 10.105.100.42 (eth0 10.105.100.42): A set, 40 headers + 0 data bytes len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=R seq=0 win=0 rtt=8.5 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=R seq=1 win=0 rtt=7.7 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=R seq=2 win=0 rtt=8.4 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=R seq=3 win=0 rtt=7.5 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=R seq=4 win=0 rtt=8.4 ms ^C --- 10.105.100.42 hping statistic --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 7.5/8.1/8.5 ms Use HPING as an port scanner: sudo hping3 --scan -S scan-target Scan router in internal network: hping3 --scan known -S 10.105.100.42 Scanning 10.105.100.42 (10.105.100.42), port known 340 ports to scan, use -V to see all the replies +----+-----------+---------+---+-----+-----+-----+ |port| serv name | flags |ttl| id | win | len | +----+-----------+---------+---+-----+-----+-----+ 21 ftp : .S..A... 59 0 14600 46 23 telnet : .S..A... 59 0 14600 46 22 ssh : .S..A... 59 0 14600 46 80 http : .S..A... 59 0 14600 46 2000 cisco-sccp : .S..A... 59 0 14600 46 All replies received. Done. Not responding ports: Scan router to establish are all services OK: hping3 --scan known -S 41.84.20.98 Scanning 41.84.20.98 (41.84.20.98), port known 340 ports to scan, use -V to see all the replies +----+-----------+---------+---+-----+-----+-----+ |port| serv name | flags |ttl| id | win | len | +----+-----------+---------+---+-----+-----+-----+ 22 ssh : .S..A... 56 0 5840 46 25 smtp : .S..A... 56 0 5840 46 53 domain : .S..A... 56 0 5840 46 80 http : .S..A... 55 0 14600 46 110 pop3 : .S..A... 56 0 5840 46 443 https : .S..A... 55 0 5840 46 10000 webmin : .S..A... 56 0 5840 46 All replies received. Done. traceroute without ICMP hping3 10.105.100.42 -A -p 80 -T -t 1 --tr-stop HPING 10.105.100.42 (eth0 10.105.100.42): A set, 40 headers + 0 data bytes hop=1 TTL 0 during transit from ip=172.28.10.1 name=UNKNOWN hop=1 hoprtt=4.6 ms hop=2 TTL 0 during transit from ip=172.31.254.254 name=gp-mr-het-mee-1-ae0-wan-1000.ensync.net hop=2 hoprtt=3.4 ms hop=3 TTL 0 during transit from ip=10.255.0.5 name=UNKNOWN hop=3 hoprtt=15.9 ms hop=4 TTL 0 during transit from ip=10.255.0.6 name=UNKNOWN hop=4 hoprtt=3.5 ms hop=5 TTL 0 during transit from ip=10.105.100.41 name=10-105-100-41-29.wireless.africainx.net hop=5 hoprtt=7.9 ms len=46 ip=10.105.100.42 ttl=59 DF id=0 sport=80 flags=R seq=5 win=0 rtt=6.8 ms --- 10.105.100.42 hping statistic --- 6 packets transmitted, 6 packets received, 0% packet loss round-trip min/avg/max = 3.4/7.0/15.9 m *** Test max troughput: sudo hping3 -c 10 -d 16000 -S -w 16384 -p 80 --flood 10.105.124.139 *** DOS (this will probabli kill host having with weak cpu/ all routers in *** the path will be affected) sudo hping3 -c 10000 -d 120 -S -w 64 -p 80 --flood --rand-source ************************** 12. nping ************************** nping == Network packet generation tool / ping utility download: http://nmap.org/nping/ Ubuntu - part of nmap package Windows - part of nmap package Mac Os X - part of nmap package From nmap.org : Nping is an open-source tool for network packet generation, response analysis and response time measurement. Nping allows users to generate network packets of a wide range of protocols, letting them tune virtually any field of the protocol headers. While Nping can be used as a simple ping utility to detect active hosts, it can also be used as a raw packet generator for network stack stress tests, ARP poisoning, Denial of Service attacks, route tracing, and other purposes. https://nmap.org/book/nping-man.html Example: generate burst of traffic to 45 hosts in 45 different networks - do 1000 packets to each host - send 10000 pps - use ICMP to generate two way traffic (echo request/response). nping -H -N -c 100000 --data-length 1000 --icmp --rate 10000 10.10.6-51.10 Generate approx 825kbps to single target for 10 sec sudo nping -H -N -c 1000 --data-length 100 --icmp --rate 100 Generate 7.6Mbps untill interrupted to single target sudo nping -H -N -c 0 --data-length 1000 --icmp --rate 1000 sudo nping -c 1 --tcp -p 80,22 41.84.22.92 Starting Nping 0.6.40 ( http://nmap.org/nping ) at 2015-08-31 09:36 SAST SENT (0.0394s) TCP 172.28.10.10:53526 > 41.84.22.92:22 S ttl=64 id=439 iplen=40 seq=2479869044 win=1480 SENT (1.0397s) TCP 172.28.10.10:53526 > 41.84.22.92:80 S ttl=64 id=439 iplen=40 seq=2479869044 win=1480 RCVD (1.0399s) TCP 41.84.22.92:22 > 172.28.10.10:53526 SA ttl=55 id=0 iplen=44 seq=1443042119 win=14600 Max rtt: 1000.433ms | Min rtt: 1000.433ms | Avg rtt: 1000.433ms Raw packets sent: 2 (80B) | Rcvd: 1 (46B) | Lost: 1 (50.00%) Nping done: 1 IP address pinged in 1.06 seconds On-Line utilities: 1. OLC Labs web Site Local speedest, looking glass, ip calaculator http://labs.openlinx.co.za/ 2. speedtest.net It can be reched via link from labs. 3. eMail related lookups MX Toolbox MX record, blacklists check , etc.. http://mxtoolbox.com/ Valli The complete IP check for sending Mailservers http://multirbl.valli.org/ SORBS The Spam and Open Relay Blocking System http://www.sorbs.net/ Replacements for deprecated Linux networking commands (eg. ifconfig) Deprecated command Replacement command(s) arp ip n (ip neighbor) ifconfig ip a (ip addr), ip link, ip -s (ip -stats) iptunnel ip tunnel iwconfig iw nameif ip link, ifrename netstat ss, ip route (for netstat-r), ip -s link (for netstat -i), ip maddr (for netstat-g) route ip r (ip route) Hping ---> http://www.hping.org Nmap ---> http://www.insecure.org/nmap Scanlogd ---> http://www.openwall.com/scanlogd OpenBSD ---> http://www.openbsd.org OpenBSD PF ---> http://www.benzedrine.cx/pf.html Ettercap ---> http://ettercap.sourceforge.net DSniff ---> http://monkey.org/~dugsong/dsniff RFC1141 ---> http://www.ietf.org/rfc/rfc1141.txt