{"id":4891,"date":"2013-01-06T12:25:02","date_gmt":"2013-01-06T17:25:02","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=4891"},"modified":"2013-01-06T12:25:02","modified_gmt":"2013-01-06T17:25:02","slug":"useful-linux-networking-commands","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/","title":{"rendered":"Useful Linux Networking Commands &#8211; Part  1"},"content":{"rendered":"<p>Someone recently asked me what some of the more useful linux networking commands are and what some of the implementations are. Here is a compiled list for some of those commands:<\/p>\n<p>(click continue reading below first before using the links&#8230; long page is long)<br \/>\n&nbsp;<br \/>\n1. <a href=\"#netstat\">netstat<\/a><br \/>\n2. <a href=\"#ping\">ping<\/a><br \/>\n3. <a href=\"#traceroute\">traceroute<\/a><br \/>\n4. <a href=\"#mtr\">mtr<\/a><br \/>\n5. <a href=\"#whois\">whois<\/a><br \/>\n6. <a href=\"#finger\">finger<\/a><br \/>\n7. <a href=\"#iptables \">iptables <\/a><br \/>\n8. <a href=\"#host\">host<\/a><br \/>\n9. <a href=\"#nslookup\">nslookup<\/a><br \/>\n10. <a href=\"#ss\">ss<\/a><br \/>\n11. <a href=\"#route\">route<\/a><\/p>\n<p>In my next post, I will be going over 10 more useful linux networking commands. I will be touching on:<br \/>\nifconfig, iwconfig, ethtool, arp, tcpdump, tracepath, nmap, telnet and dig<\/p>\n<p><!--more--><\/p>\n<p>This is the command to start, restart or stop the network and is also available via the Service command option shown below:<br \/>\n<code><br \/>\n\/etc\/rc.d\/init.d\/network start<br \/>\n\/etc\/rc.d\/init.d\/network stop<br \/>\n\/etc\/rc.d\/init.d\/network restart<br \/>\n<\/code><br \/>\nor<br \/>\n<code><br \/>\nservice network start<br \/>\nservice network stop<br \/>\nservice network restart<br \/>\n<\/code><br \/>\n&nbsp;<\/p>\n<p><strong id=\"netstat\">1. netstat<\/strong> &#8211; netstat displays network connections, routing tables, interface stats, masquerade connections and multicast memberships.<br \/>\nTo list externally connected processes use: <code>netstat -punta<\/code><\/p>\n<p>-a: Shows both listening and non-listening sockets.<br \/>\n-p: Shows PID of process owning socket<br \/>\n-u: Shows UDP connections<br \/>\n-t: Shows TCP connections<br \/>\n-n: Shows IP addresses only. Don&#8217;t resolve host names<br \/>\n-g: Shows multi-cast group membership info<br \/>\n-c: Shows Continuous mode &#8211; update info every second<br \/>\n-v: Shows Verbose<br \/>\n-e: Shows Extended information<br \/>\n-o: Shows network timer information<br \/>\n&nbsp;<\/p>\n<p>To list all connected processes: <code>netstat -nap<\/code><br \/>\n&nbsp;<br \/>\nTo show network statistics: <code>netstat -s<\/code><br \/>\n&nbsp;<br \/>\nTo display routing table info:<br \/>\n<code>$ netstat -nr<br \/>\nKernel IP routing table<br \/>\nDestination     Gateway         Genmask         Flags   MSS Window  irtt Iface<br \/>\n192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0<br \/>\n169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0<br \/>\n0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0<br \/>\n<\/code><br \/>\nFlags:<br \/>\nG: route uses gateway<br \/>\nU: Interface is &#8220;up&#8221;<br \/>\nH: Only a single host is accessible (eg. loopback)<br \/>\nD: Entry generated by ICMP redirect message<br \/>\nM: Modified by ICMP redirect message<\/p>\n<p>To display interface statistics:<br \/>\n<code>$ netstat -i<br \/>\nKernel Interface table<br \/>\nIface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg<br \/>\neth0       1500   0     2224      0      0      0     1969      0      0      0 BMRU<br \/>\nlo        16436   0     1428      0      0      0     1428      0      0      0 LRU<br \/>\n<\/code><br \/>\nWhere:<br \/>\nRX-OK\/TX-OK: number of packets transmitted\/received error free<br \/>\nRX-ERR\/TX-ERR: number of dammaged\/error packets transmitted\/received<br \/>\nRX-DRP\/TX-DRP: number of dropped packets<br \/>\nRX-OVR\/TX-OVR: number of packets dropped because of a buffer overrun<br \/>\nFlags:<br \/>\nB: A broadcast address has been set<br \/>\nL: This interface is a loopback device<br \/>\nM: All packets are received<br \/>\nN: Trailers are avoided<br \/>\nO: ARP is turned off for this interface<br \/>\nP: Point-to-point connection<br \/>\nR: Interface is running<br \/>\nU: Interface is up<br \/>\n&nbsp;<\/p>\n<hr \/>\n<p><strong id=\"ping\">2. ping<\/strong> &#8211; send ICMP ECHO_REQUEST packets to network hosts. Use Cntl-C to stop ping.<\/p>\n<p>Increase Ping Time Interval: Example: Wait for 5 seconds before sending the next packet.<br \/>\n<code>$ ping -i 5 IP<\/code><\/p>\n<p>Decrease Ping Time Interval: Example: Wait 0.1 seconds before sending the next packet.<br \/>\n<code># ping -i 0.1 IP<\/code><br \/>\n&nbsp;<br \/>\nSend X number of packets and stop<br \/>\n<code>[root@host] ~ >> ping -c 5 google.com<br \/>\nPING google.com (74.125.225.110) 56(84) bytes of data.<br \/>\n64 bytes from ord08s08-in-f14.1e100.net (74.125.225.110): icmp_seq=1 ttl=57 time=12.1 ms<br \/>\n64 bytes from ord08s08-in-f14.1e100.net (74.125.225.110): icmp_seq=2 ttl=57 time=13.0 ms<br \/>\n64 bytes from ord08s08-in-f14.1e100.net (74.125.225.110): icmp_seq=3 ttl=57 time=12.3 ms<br \/>\n64 bytes from ord08s08-in-f14.1e100.net (74.125.225.110): icmp_seq=4 ttl=57 time=12.3 ms<br \/>\n64 bytes from ord08s08-in-f14.1e100.net (74.125.225.110): icmp_seq=5 ttl=57 time=11.8 ms<\/p>\n<p>--- google.com ping statistics ---<br \/>\n5 packets transmitted, 5 received, 0% packet loss, time 3999ms<br \/>\nrtt min\/avg\/max\/mdev = 11.877\/12.330\/13.000\/0.396 ms<\/code><br \/>\n&nbsp;<br \/>\nPing Flood<br \/>\n<code># ping -f 74.125.225.110<br \/>\nPING 69.167.143.106 (69.167.143.106) 56(84) bytes of data.<br \/>\n.^C<br \/>\n--- 74.125.225.110 ping statistics ---<br \/>\n9838 packets transmitted, 9837 received, 0% packet loss, time 9930ms<br \/>\nrtt min\/avg\/max\/mdev = 0.679\/0.962\/7.453\/0.323 ms, ipg\/ewma 1.009\/0.931 ms<\/code><br \/>\n&nbsp;<br \/>\nFind IP<br \/>\n<code># ping -c 1 google.com<br \/>\nPING google.com <strong>(74.125.225.110)<\/strong> 56(84) bytes of data.<br \/>\n64 bytes from ord08s08-in-f14.1e100.net <strong>(74.125.225.110)<\/strong>: icmp_req=1 ttl=59 time=12.1 ms<\/p>\n<p>--- google.com ping statistics ---<br \/>\n1 packets transmitted, 1 received, 0% packet loss, time 0ms<br \/>\nrtt min\/avg\/max\/mdev = 12.150\/12.150\/12.150\/0.000 ms<\/code><br \/>\n&nbsp;<br \/>\nRecord and print route of how ECHO_REQUEST sent and ECHO_REPLY received<br \/>\n<code>#ping -R google.com<\/code><br \/>\nmost hosts ignore this request<\/p>\n<hr \/>\n<p>&nbsp;<br \/>\n<strong id=\"traceroute\">3. traceroute<\/strong> &#8211; print the route packets take to a network host.<br \/>\ntraceroute [-d] [-F] [-I] [-n] [-v] [-x] [-f first_ttl] [-g gateway [-g gateway] | -r] [-i iface] [-m max_ttl] [-p port] [-q nqueries] [-s src_addr] [-t tos] [-w waittime ] host [packetlen]<\/p>\n<p><code>traceroute 74.125.225.104<br \/>\ntraceroute google.com<br \/>\nTracing route to www.l.google.com [209.85.225.104]<br \/>\nover a maximum of 30 hops:<\/p>\n<p>   1    &lt;1 ms    &lt;1 ms    &lt;1 ms  10.1.0.1<br \/>\n   2    35 ms    19 ms    29 ms  98.245.140.1<br \/>\n   3    11 ms    27 ms     9 ms  te-0-3.dnv.comcast.net [68.85.105.201]<br \/>\n   ...<br \/>\n  13    81 ms    76 ms    75 ms  209.85.241.37<br \/>\n  14    84 ms    91 ms    87 ms  209.85.248.102<br \/>\n  15    76 ms   112 ms    76 ms  iy-f104.1e100.net [209.85.225.104]<\/p>\n<p>Trace complete.<\/code><br \/>\n&nbsp;<br \/>\nTo disable IP address and hostname mapping use the -n flag.<br \/>\n<code>$ traceroute google.com -n<\/code><br \/>\n&nbsp;<br \/>\nTo configure the response wait time, use the \u2018-w\u2019 option which the command will take as the length of time to wait for a response. Below, the wait time is 0.1 seconds.<br \/>\n<code>$ traceroute google.com -w 0.1<\/code><br \/>\n&nbsp;<br \/>\nTraceroute usually defaults to 3 packets per hop. To modify this behavior, use the \u2018-q\u2019 option to configure the number of queries per hop.<br \/>\n<code>$ traceroute google.com -q 5<\/code><br \/>\n&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<br \/>\n<strong id=\"mtr\">4. mtr<\/strong> &#8211; a network diagnostic tool introduced in Fedora &#8211; Like traceroute except it gives more network quality and network diagnostic info. Leave running to get real time stats. Reports best and worst round trip times in milliseconds.<br \/>\n<code>mtr 72.30.38.140<br \/>\nmtr yahoo.com<\/p>\n<p>           My traceroute  [v0.71]<br \/>\n            example.lan                           Sun Mar 25 00:07:50 2007<\/p>\n<p>                                       Packets                Pings<br \/>\nHostname                            %Loss  Rcv  Snt  Last Best  Avg  Worst<br \/>\n 1. example.lan                        0%   11   11     1    1    1      2<br \/>\n 2. ae-31-51.ebr1.Chicago1.Level3.n   19%    9   11     3    1    7     14<br \/>\n 3. ae-1.ebr2.Chicago1.Level3.net      0%   11   11     7    1    7     14<br \/>\n 4. ae-2.ebr2.Washington1.Level3.ne   19%    9   11    19   18   23     31<br \/>\n 5. ae-1.ebr1.Washington1.Level3.ne   28%    8   11    22   18   24     30<br \/>\n 6. ge-3-0-0-53.gar1.Washington1.Le    0%   11   11    18   18   20     36<br \/>\n 7. 63.210.29.230                      0%   10   10    19   19   19     19<br \/>\n 8. t-3-1.bas1.re2.yahoo.com           0%   10   10    19   18   32    106<br \/>\n 9. p25.www.re2.yahoo.com              0%   10   10    19   18   19     19<\/code><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<br \/>\n<strong id=\"whois\">5. whois<\/strong> &#8211; Lookup a domain name in the internic whois database.<\/p>\n<p><code>whois google.com<\/code><\/p>\n<p>or course, since its google, you will get some strange responses:<\/p>\n<p><code>  Server Name: GOOGLE.COM.PEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEENIS.COM<br \/>\n   IP Address: 8.8.8.8<br \/>\n   Registrar: DOMAIN.COM, LLC<br \/>\n   Whois Server: whois.domain.com<br \/>\n   Referral URL: http:\/\/www.domain.com<\/p>\n<p> Server Name: GOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM<br \/>\n   IP Address: 69.41.185.195<br \/>\n   Registrar: TUCOWS.COM CO.<br \/>\n   Whois Server: whois.tucows.com<br \/>\n   Referral URL: http:\/\/domainhelp.opensrs.net<\/p>\n<p>Server Name: GOOGLE.COM.SUCKS.FIND.CRACKZ.WITH.SEARCH.GULLI.COM<br \/>\n   IP Address: 80.190.192.24<br \/>\n   Registrar: EPAG DOMAINSERVICES GMBH<br \/>\n   Whois Server: whois.enterprice.net<br \/>\n   Referral URL: http:\/\/www.enterprice.net<br \/>\n<\/code><br \/>\nheh&#8230; onward&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p><strong id=\"finger\">6. finger<\/strong> &#8211; Display information on a system user. i.e. finger user@host Uses $HOME\/.plan and $HOME\/.project user files.<br \/>\n<code>$ finger gooduser<br \/>\nLogin:     gooduser                      Name: (null)<br \/>\nDirectory: \/home\/gooduser               Shell: \/bin\/bash<br \/>\nOn since Mon Nov  1 18:45 (IST) on :0 (messages off)<br \/>\nOn since Mon Nov  1 18:46 (IST) on pts\/0 from :0.0<br \/>\nNew mail received Fri May  7 10:33 2010 (IST)<br \/>\nUnread since Sat Jun  7 12:59 2008 (IST)<br \/>\nNo Plan.<\/code><\/p>\n<p>You can also use the finger -s option to view the login detail for a particular user.<br \/>\n<code>$ finger -s root<br \/>\nLogin     Name       \t\tTty      Idle  Login Time   Office     Office Phone<br \/>\nroot         root           *1    19d Wed 17:45<br \/>\nroot         root           *2     3d Fri 16:53<br \/>\nroot         root           *3        Mon 20:20<br \/>\nroot         root           *ta    2  Tue 15:43<br \/>\nroot         root           *tb    2  Tue 15:44<br \/>\n<\/code><br \/>\n-s\tDisplay the user\u2019s login name, real name, terminal name and write status idle time, login time, and either office location and office phone number, or the remote host.<br \/>\n-p\tPrevent the -l option of finger from displaying the contents of the .forward, .plan, .project and .pubkey files.<br \/>\n-m\tPrevent matching of user names. User is usually a login name; however, matching will also be done on the users\u2019 real names, unless the -m option is supplied.Display the user\u2019s login name, real name, terminal name and write status idle time, login time, and either office location and office phone number, or the remote host.<br \/>\n-o\tWhen used in conjunction with the -s option, the office location and office phone information is displayed instead of the name of the remote host.<\/p>\n<hr \/>\n<p>&nbsp;<br \/>\n<strong id=\"iptables\">7. iptables<\/strong> &#8211; Iptables is used to set up, maintain, and inspect the tables of IPv4 packet filter rules in the Linux kernel.<br \/>\nFlush <code>iptables -F<br \/>\n(or)<br \/>\niptables --flush<\/code><br \/>\n&nbsp;<\/p>\n<p>Block IP<br \/>\n<code>BLOCK_THIS_IP=\"x.x.x.x\"<br \/>\niptables -A INPUT -s \"$BLOCK_THIS_IP\" -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>Block only TCP traffic on eth0 connection for this ip-address.<br \/>\n<code>iptables -A INPUT -i eth0 -s \"$BLOCK_THIS_IP\" -j DROP<br \/>\niptables -A INPUT -i eth0 -p tcp -s \"$BLOCK_THIS_IP\" -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>Prevent DoS Attack: The following iptables rule will help you prevent the Denial of Service (DoS) attack on your webserver.<br \/>\n<code>iptables -A INPUT -p tcp --dport 80 -m limit --limit 25\/minute --limit-burst 100 -j ACCEPT<\/code><br \/>\nIn this example:<br \/>\n-m limit: uses the limit iptables extension<br \/>\n\u2013limit 25\/minute: This limits a maximum of 25 connection per minute. Change this value based on your specific need<br \/>\n\u2013limit-burst 100: This value indicates that the limit\/minute will be enforced only after the total number of connection has reached the limit-burst level.<br \/>\n&nbsp;<\/p>\n<p>Displaying the Status of Your Firewall<br \/>\n<code># iptables -L -n -v<\/code><br \/>\n&nbsp;<\/p>\n<p>To add line numbers use and scroll through the information<br \/>\n<code># iptables -n -L -v --line-numbers | less<\/code><br \/>\n&nbsp;<\/p>\n<p>Stop \/ Start \/ Restart the Firewall if you are using CentOS \/ RHEL \/ Fedora Linux, enter:<br \/>\n<code># service iptables stop<br \/>\n# service iptables start<br \/>\n# service iptables restart<\/code><br \/>\n&nbsp;<\/p>\n<p>You can also use the iptables command itself to stop the firewall and delete all the rules:<br \/>\n<code># iptables -F<br \/>\n# iptables -X<br \/>\n# iptables -t nat -F<br \/>\n# iptables -t nat -X<br \/>\n# iptables -t mangle -F<br \/>\n# iptables -t mangle -X<br \/>\n# iptables -P INPUT ACCEPT<br \/>\n# iptables -P OUTPUT ACCEPT<br \/>\n# iptables -P FORWARD ACCEPT<\/code><\/p>\n<p>-F : Deleting (flushing) all the rules.<br \/>\n-X : Delete chain.<br \/>\n-t : table_name : Select table (called nat or mangle) and delete\/flush rules.<br \/>\n-P : Set the default policy (such as DROP, REJECT, or ACCEPT).<br \/>\n&nbsp;<\/p>\n<p>Find and Delete Firewall Rules<br \/>\nTo display line number along with other information for existing rules, enter:<br \/>\n<code># iptables -L INPUT -n --line-numbers<br \/>\n# iptables -L OUTPUT -n --line-numbers<br \/>\n# iptables -L OUTPUT -n --line-numbers | less<br \/>\n# iptables -L OUTPUT -n --line-numbers | grep 172.16.54.1<\/code><br \/>\nYou will get the list of IP;s. Find the number on the left which corresponds to the rule to delete, then use specific number to delete it. <\/p>\n<p>For example delete line number 4, enter:<br \/>\n<code># iptables -D INPUT 4<\/code><br \/>\nOR find the specific source IP 202.54.1.1 and delete it from the rules:<br \/>\n<code># iptables -D INPUT -s 202.54.1.1 -j DROP<\/code><br \/>\n-D : Deletes one or more rules from the selected chain<br \/>\n&nbsp;<\/p>\n<p>Insert Firewall Rules<br \/>\nTo insert one or more rules in the chain as a specific rule number, use the following syntax. First find out line numbers:<br \/>\n<code># iptables -L INPUT -n --line-numbers<\/code><br \/>\noutputs:<br \/>\n<code>Chain INPUT (policy DROP)<br \/>\nnum  target     prot opt source               destination<br \/>\n1    DROP       all  --  202.54.1.1           0.0.0.0\/0<br \/>\n2    ACCEPT     all  --  0.0.0.0\/0            0.0.0.0\/0           state NEW,ESTABLISHED <\/code><br \/>\n&nbsp;<br \/>\nTo insert rule between 1 and 2, enter:<br \/>\n<code># iptables -I INPUT 2 -s 202.54.1.2 -j DROP<\/code><br \/>\n&nbsp;<br \/>\nTo view updated rules, enter:<br \/>\n<code># iptables -L INPUT -n --line-numbers<\/code><br \/>\n&nbsp;<\/p>\n<p>To Save The Firewall Rules under CentOS \/ RHEL \/ Fedora Linux, enter:<br \/>\n<code># service iptables save<\/code><br \/>\n&nbsp;<\/p>\n<p>To Block an attackers IP Address, enter:<br \/>\n<code># iptables -A INPUT -s 5.6.7.8 -j DROP<br \/>\n# iptables -A INPUT -s 192.168.0.0\/24 -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>To block incoming all service requests on port 80, enter:<br \/>\n<code># iptables -A INPUT -p tcp --dport 80 -j DROP<br \/>\n# iptables -A INPUT -i eth1 -p tcp --dport 80 -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>To block an ip address for port 80 only, enter:<br \/>\n<code># iptables -A INPUT -p tcp -s 5.6.7.8 --dport 80 -j DROP<br \/>\n# iptables -A INPUT -i eth1 -p tcp -s 192.168.1.0\/24 --dport 80 -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>To block outgoing traffic to a particular host or domain such as facebook.com, enter:<br \/>\n<code># host -t a facebook.com<br \/>\nfacebook.com has address 173.252.100.16<\/code>&nbsp;<br \/>\nNote its IP address and enter the following to block all outgoing traffic to 173.252.100.16<br \/>\n<code># iptables -A OUTPUT -d 173.252.100.16 -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>You can also drop a subnet like so:<br \/>\n<code># iptables -A OUTPUT -d 192.168.1.0\/24 -j DROP<br \/>\n# iptables -A OUTPUT -o eth1 -d 192.168.1.0\/24 -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>You can also use a domain name to drop traffic, enter:<br \/>\n<code># iptables -A OUTPUT -p tcp -d www.facebook.com -j DROP<br \/>\n# iptables -A OUTPUT -p tcp -d facebook.com -j DROP<\/code><br \/>\n&nbsp;<\/p>\n<p>To open a range of ports, use the following syntax:<br \/>\n<code>#iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 42000:42100 -j ACCEPT<\/code><br \/>\n&nbsp;<\/p>\n<p>To open range of IP addresses, use the following syntax:<br \/>\n<code>## only accept connection to tcp port 80 (Apache) if ip is between 192.168.1.1 and 192.168.1.50 ##<br \/>\niptables -A INPUT -p tcp --destination-port 80 -m iprange --src-range 192.168.1.1-192.168.1.50 -j ACCEPT<\/code><br \/>\n&nbsp;<\/p>\n<p>For more info, see the man file or use -h for a full list of flags<br \/>\n<code>#man iptables<br \/>\n#iptables -h<\/code><br \/>\n&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>&nbsp;<br \/>\n<strong id=\"host\">8. host<\/strong> &#8211; Enter a host name and the command will return IP address. Unlike nslookup, the host command will use both \/etc\/hosts as well as DNS.<br \/>\nExample:<br \/>\n<code>root@user:# host google.com<br \/>\ngoogle.com has address 74.125.225.103<br \/>\ngoogle.com has address 74.125.225.104<br \/>\ngoogle.com has address 74.125.225.105<br \/>\ngoogle.com has address 74.125.225.110<br \/>\ngoogle.com has address 74.125.225.96<br \/>\ngoogle.com has address 74.125.225.97<br \/>\ngoogle.com has address 74.125.225.98<br \/>\ngoogle.com has address 74.125.225.99<br \/>\ngoogle.com has address 74.125.225.100<br \/>\ngoogle.com has address 74.125.225.101<br \/>\ngoogle.com has address 74.125.225.102<br \/>\ngoogle.com has IPv6 address 2607:f8b0:4009:802::100e<br \/>\ngoogle.com mail is handled by 40 alt3.aspmx.l.google.com.<br \/>\ngoogle.com mail is handled by 50 alt4.aspmx.l.google.com.<br \/>\ngoogle.com mail is handled by 10 aspmx.l.google.com.<br \/>\ngoogle.com mail is handled by 20 alt1.aspmx.l.google.com.<br \/>\ngoogle.com mail is handled by 30 alt2.aspmx.l.google.com.<\/code><br \/>\n&nbsp;<\/p>\n<p>Locate the hosts IP via the A record:<br \/>\n<code>root@host# host -t a yahoo.com<br \/>\nyahoo.com has address 72.30.38.140<br \/>\nyahoo.com has address 98.138.253.109<br \/>\nyahoo.com has address 98.139.183.24<\/code><br \/>\n&nbsp;<\/p>\n<p>Locate the MX records information<br \/>\n<code>root@hist# host -t mx yahoo.com<br \/>\nyahoo.com mail is handled by 1 mta7.am0.yahoodns.net.<br \/>\nyahoo.com mail is handled by 1 mta5.am0.yahoodns.net.<br \/>\nyahoo.com mail is handled by 1 mta6.am0.yahoodns.net.<\/code><br \/>\n&nbsp;<\/p>\n<p>To display all information about a domains zonefile and records, you need to pass the -a (all) option:<br \/>\n<code>$ host -a yahoo.com<br \/>\n;; ANSWER SECTION:<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns1.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns2.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns3.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns4.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns5.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns6.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns8.yahoo.com.<br \/>\nyahoo.com.\t\t498\tIN\tMX\t1 mta7.am0.yahoodns.net.<br \/>\nyahoo.com.\t\t498\tIN\tMX\t1 mta5.am0.yahoodns.net.<br \/>\nyahoo.com.\t\t498\tIN\tMX\t1 mta6.am0.yahoodns.net.<br \/>\nyahoo.com.\t\t420\tIN\tA\t98.139.183.24<br \/>\nyahoo.com.\t\t420\tIN\tA\t72.30.38.140<br \/>\nyahoo.com.\t\t420\tIN\tA\t98.138.253.109<\/p>\n<p>;; AUTHORITY SECTION:<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns2.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns3.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns4.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns5.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns6.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns8.yahoo.com.<br \/>\nyahoo.com.\t\t877\tIN\tNS\tns1.yahoo.com.<\/p>\n<p>;; ADDITIONAL SECTION:<br \/>\nns6.yahoo.com.\t\t877\tIN\tA\t202.43.223.170<br \/>\nns8.yahoo.com.\t\t877\tIN\tA\t202.165.104.22<\/code>&nbsp;<\/p>\n<p>To do a recerse IP lookup<br \/>\n<code>root@host# host 72.30.38.140<br \/>\n140.38.30.72.in-addr.arpa domain name pointer ir1.fp.vip.sp2.yahoo.com.<\/code><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<br \/>\n<strong id=\"nslookup\">9. nslookup<\/strong> &#8211; This is a network admin tool for querying DNS to obtain domain name or IP address mapping or any other specific DNS info and also used to troubleshoot DNS related problems<\/p>\n<p><code>root@host# nslookup yahoo.com<br \/>\nServer:\t\t127.0.1.1<br \/>\nAddress:\t127.0.1.1#53<\/p>\n<p>Non-authoritative answer:<br \/>\nName:\tyahoo.com<br \/>\nAddress: 98.138.253.109<br \/>\nName:\tyahoo.com<br \/>\nAddress: 98.139.183.24<br \/>\nName:\tyahoo.com<br \/>\nAddress: 72.30.38.140<\/code><br \/>\n&nbsp;<\/p>\n<p>You can also do a reverse DNS look-up by providing the IP Address as argument to nslookup.<br \/>\n<code>root@host# nslookup redhat.com ns1.redhat.com<br \/>\nServer:\t\tns1.redhat.com<br \/>\nAddress:\t209.132.186.218#53<\/p>\n<p>Name:\tredhat.com<br \/>\nAddress: 209.132.183.181<\/code><br \/>\n&nbsp;<\/p>\n<p>Query for specific DNS server information using the &#8216;-query=&#8217; option and an of the specific dns record types<br \/>\nnslookup -query= a, mx, soa, ns, text eg.<\/p>\n<p>To search for the mx record for Redhat<br \/>\n<code>root@host# nslookup -query=mx redhat.com<br \/>\nServer:\t\t127.0.1.1<br \/>\nAddress:\t127.0.1.1#53<\/p>\n<p>Non-authoritative answer:<br \/>\nredhat.com\tmail exchanger = 5 mx1.redhat.com.<br \/>\nredhat.com\tmail exchanger = 10 mx2.redhat.com.<\/p>\n<p>Authoritative answers can be found from:<br \/>\nredhat.com\tnameserver = ns4.redhat.com.<br \/>\nredhat.com\tnameserver = ns1.redhat.com.<br \/>\nredhat.com\tnameserver = ns2.redhat.com.<br \/>\nredhat.com\tnameserver = ns3.redhat.com.<br \/>\nmx1.redhat.com\tinternet address = 209.132.183.28<br \/>\nmx2.redhat.com\tinternet address = 66.187.233.33<br \/>\nns1.redhat.com\tinternet address = 209.132.186.218<\/code><\/p>\n<p>or search for the soa record<br \/>\n<code>root@host# nslookup -query=soa redhat.com<br \/>\nServer:\t\t127.0.1.1<br \/>\nAddress:\t127.0.1.1#53<\/p>\n<p>Non-authoritative answer:<br \/>\nredhat.com<br \/>\n\torigin = ns1.redhat.com<br \/>\n\tmail addr = noc.redhat.com<br \/>\n\tserial = 2013010502<br \/>\n\trefresh = 300<br \/>\n\tretry = 180<br \/>\n\texpire = 604800<br \/>\n\tminimum = 14400<\/p>\n<p>Authoritative answers can be found from:<br \/>\nredhat.com\tnameserver = ns4.redhat.com.<br \/>\nredhat.com\tnameserver = ns1.redhat.com.<br \/>\nredhat.com\tnameserver = ns2.redhat.com.<br \/>\nredhat.com\tnameserver = ns3.redhat.com.<br \/>\nns1.redhat.com\tinternet address = 209.132.186.218<br \/>\n<\/code><br \/>\nBasically, any dns record type can be searched for using this method<br \/>\n&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p><strong id=\"ss\">10. ss<\/strong> &#8211; The ss command dumps socket (network connection) statistics such as all TCP \/ UDP connections, current established connections per protocol (e.g., displays all established ssh connections), and displays all of the tcp sockets in various states such as ESTABLISHED or FIN-WAIT-1.<br \/>\n<code>[root@host] ~ >> ss -s<br \/>\nTotal: 111 (kernel 128)<br \/>\nTCP:   44 (estab 1, closed 5, orphaned 0, synrecv 0, timewait 5\/0), ports 32<\/p>\n<p>Transport Total     IP        IPv6<br \/>\n*\t  128       -         -<br \/>\nRAW\t  0         0         0<br \/>\nUDP\t  13        10        3<br \/>\nTCP\t  39        29        10<br \/>\nINET\t  52        39        13<br \/>\nFRAG\t  0         0         0  <\/code><\/p>\n<p>Use ss to display all open network ports:<br \/>\n<code>[root@host] ~ >> ss -l<br \/>\nRecv-Q Send-Q               Local Address:Port                   Peer Address:Port<br \/>\n0      0                        127.0.0.1:6082                              *:*<br \/>\n0      0                                *:infowave                           *:*<br \/>\n0      0                                *:radsec                            *:*<br \/>\n0      0                                *:gnunet                            *:*<br \/>\n0      0                                *:eli                               *:*<br \/>\n0      0                                *:mysql                             *:*<br \/>\n0      0                                *:submission                           *:*<br \/>\n0      0                        127.0.0.1:783                               *:*<br \/>\n0      0                                *:nbx-ser                           *:*<br \/>\n0      0                                *:http                              *:*<br \/>\n0      0                                *:nbx-dir                           *:*<br \/>\n0      0                                *:smtps                             *:*<br \/>\n0      0                                *:xfer                              *:*<br \/>\n0      0                                *:us-cli                            *:*<br \/>\n0      0                         10.1.0.1:domain                            *:*<br \/>\n0      0                                *:munin                             *:*<br \/>\n0      0                   68.197.153.147:domain                            *:*<br \/>\n0      0                   68.197.153.148:domain                            *:*<br \/>\n0      0                        127.0.0.1:domain                            *:*<br \/>\n0      0                                *:ssh                               *:*<br \/>\n0      0                                *:ddi-tcp-1                         *:*<br \/>\n0      0                                *:smtp                              *:*<br \/>\n0      0                                *:ddi-tcp-2                         *:*<br \/>\n0      0                        127.0.0.1:rndc                              *:*<br \/>\n0      0                                *:https                             *:*<br \/>\n0      0                                *:trellisagt                        *:*<br \/>\n0      0                                *:trellissvr                        *:*<br \/>\n0      0                               :::imaps                             :::*<br \/>\n0      0                               :::pop3s                             :::*<br \/>\n0      0                               :::submission                        :::*<br \/>\n0      0                               :::pop3                              :::*<br \/>\n0      0                               :::imap                              :::*<br \/>\n0      0                               :::smtps                             :::*<br \/>\n0      0                               :::us-cli                            :::*<br \/>\n0      0                               :::ftp                               :::*<br \/>\n0      0                               :::ssh                               :::*<br \/>\n0      0                               :::smtp                              :::*<\/code>&nbsp;<\/p>\n<p>Command arguments for ss<\/p>\n<p>The general format of arguments to ss are:<br \/>\n<strong><em>ss [ OPTIONS ] [ STATE-FILTER ] [ ADDRESS-FILTER ]<\/em><\/strong><br \/>\nusing common unix flag conventions.<\/p>\n<p>-h &#8211; show help page<br \/>\n-? &#8211; the same, of course<br \/>\n-v, -V &#8211; print version of ss and exit<br \/>\n-s &#8211; print summary statistics. This option does not parse socket lists obtaining summary from various sources. It is useful when amount of sockets is so huge that parsing \/proc\/net\/tcp is painful.<br \/>\n-D FILE &#8211; do not display anything, just dump raw information about TCP sockets to FILE after applying filters. If FILE is &#8211; stdout is used.<br \/>\n-F FILE &#8211; read continuation of filter from FILE. Each line of FILE is interpreted like single command line option. If FILE is &#8211; stdin is used.<br \/>\n-r &#8211; try to resolve numeric address\/ports<br \/>\n-n &#8211; do not try to resolve ports<br \/>\n-o &#8211; show some optional information, f.e. TCP timers<br \/>\n-i &#8211; show some infomration specific to TCP (RTO, congestion window, slow start threshould etc.)<br \/>\n-e &#8211; show even more optional information<br \/>\n-m &#8211; show extended information on memory used by the socket. It is available only with tcp_diag enabled.<br \/>\n-p &#8211; show list of processes owning the socket<br \/>\n-f FAMILY &#8211; default address family used for parsing addresses. Also this option limits listing to sockets supporting given address family. Currently the following families are supported: unix, inet, inet6, link, netlink.<br \/>\n-4 &#8211; alias for -f inet<br \/>\n-6 &#8211; alias for -f inet6<br \/>\n-0 &#8211; alias for -f link<br \/>\n-A LIST-OF-TABLES &#8211; list of socket tables to dump, separated by commas. The following identifiers are understood: all, inet, tcp, udp, raw, unix, packet, netlink, unix_dgram, unix_stream, packet_raw, packet_dgram.<br \/>\n-x &#8211; alias for -A unix<br \/>\n-t &#8211; alias for -A tcp<br \/>\n-u &#8211; alias for -A udp<br \/>\n-w &#8211; alias for -A raw<br \/>\n-a &#8211; show sockets of all the states. By default sockets in states LISTEN, TIME-WAIT, SYN_RECV and CLOSE are skipped.<br \/>\n-l &#8211; show only sockets in state LISTEN<br \/>\n&nbsp;<\/p>\n<p>STATE-FILTER allows ss to construct arbitrary set of states to match entries. Its syntax is sequence of keywords state and exclude followed by identifier of state. Available identifiers are:<\/p>\n<p>All standard TCP states: established, syn-sent, syn-recv, fin-wait-1, fin-wait-2, time-wait, closed, close-wait, last-ack, listen and closing.<br \/>\n* &#8211; all &#8211; for all the states<br \/>\n* &#8211; connected &#8211; all the states except for listen and closed<br \/>\n* &#8211; synchronized &#8211; all the connected states except for syn-sent<br \/>\n* &#8211; bucket &#8211; states, which are maintained as minisockets, i.e. time-wait and syn-recv.<br \/>\n* &#8211; big &#8211; opposite to bucket<br \/>\n&nbsp;<\/p>\n<p>ADDRESS_FILTER is boolean expression with operations and, or and not, which can be abbreviated in C style f.e. as &#038;, &#038;&#038;.<br \/>\nPredicates check socket addresses, both local and remote. There are the following kinds of predicates:<\/p>\n<p>* &#8211; dst ADDRESS_PATTERN &#8211; matches remote address and port<br \/>\n* &#8211; src ADDRESS_PATTERN &#8211; matches local address and port<br \/>\n* &#8211; dport RELOP PORT &#8211; compares remote port to a number<br \/>\n* &#8211; sport RELOP PORT &#8211; compares local port to a number<br \/>\n* &#8211; autobound &#8211; checks that socket is bound to an ephemeral port<br \/>\n* &#8211; RELOP is some of < =, >=, == etc. To make this more convinient for use in unix shell, alphabetic FORTRAN-like notations le, gt etc. are accepted as well.<br \/>\n&nbsp;<br \/>\nThe format and semantics of ADDRESS_PATTERN depends on address family.<\/p>\n<p>* &#8211; inet &#8211; ADDRESS_PATTERN consists of IP prefix, optionally followed by colon and port. If prefix or port part is absent or replaced with *, this means wildcard match.<br \/>\n* &#8211; inet6 &#8211; The same as inet, only prefix refers to an IPv6 address. Unlike inet colon becomes ambiguous, so that ss allows to use scheme, like used in URLs, where address is suppounded with [ &#8230; ].<br \/>\n* &#8211; unix &#8211; ADDRESS_PATTERN is shell-style wildcard.<br \/>\n* &#8211; packet &#8211; format looks like inet, only interface index stays instead of port and link layer protocol id instead of address.<br \/>\n* &#8211; netlink &#8211; format looks like inet, only socket pid stays instead of port and netlink channel instead of address.<br \/>\n* &#8211; PORT is syntactically ADDRESS_PATTERN with wildcard address part. Certainly, it is undefined for UNIX sockets.<br \/>\n&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<br \/>\n<strong id=\"route\">11. route<\/strong> &#8211; The route command shows or manipulates the IP routing table<br \/>\nBy default the route command will show the details of the kernel routing table entries.<\/p>\n<p><code>[root@host] ~ >> route<br \/>\nKernel IP routing table<br \/>\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface<br \/>\n68.197.153.147  *               255.255.255.255 UH    0      0        0 eth0<br \/>\n10.2.0.2        *               255.255.255.255 UH    0      0        0 tun0<br \/>\n10.2.0.0        10.2.0.2        255.255.255.0   UG    0      0        0 tun0<br \/>\n68.197.153.0    *               255.255.252.0   U     0      0        0 eth0<br \/>\n168.254.0.0     *               255.255.0.0     U     0      0        0 eth0<br \/>\ndefault         10.2.0.1        0.0.0.0         UG    0      0        0 eth0 <\/code><br \/>\n&nbsp;<\/p>\n<p>To add a default gateway, we can specify that the packets that are not within the network have to be forwarded to a specific Gateway address.<br \/>\nThe following &#8216;route add&#8217; command will set the default gateway as 192.168.1.1.<br \/>\n<code>$ route add default gw 192.168.1.1<\/code><br \/>\n&nbsp;<\/p>\n<p>Now the route command will display the following entries.<br \/>\n<code>$ route<br \/>\nKernel IP routing table<br \/>\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface<br \/>\n192.168.1.0     *               255.255.255.0   U     0      0        0 eth0<br \/>\ndefault         myserver.com    0.0.0.0         UG    0      0        0 eth0<\/code><\/p>\n<p>Lots more info regarding the route command can be found <a href=\"http:\/\/www.linux-ip.net\/html\/tools-ip-route.html\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<br \/>\nIn my next post, I will be going over 10 more useful linux networking commands. I will be touching on:<br \/>\nifconfig, iwconfig, ethtool, arp, whois, tcpdump, tracepath, nmap, telnet and dig<\/p>\n<p>I hope you find this info useful&#8230;   \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Someone recently asked me what some of the more useful linux networking commands are and what some of the implementations are. Here is a compiled list for some of those commands: (click continue reading below first before using the links&#8230; long page is long) &nbsp; 1. netstat 2. ping 3. traceroute 4. mtr 5. whois&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-4891","post","type-post","status-publish","format-standard","hentry","category-networking"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Useful Linux Networking Commands - Part 1 - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Useful Linux Networking Commands - Part 1 - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"Someone recently asked me what some of the more useful linux networking commands are and what some of the implementations are. Here is a compiled list for some of those commands: (click continue reading below first before using the links&#8230; long page is long) &nbsp; 1. netstat 2. ping 3. traceroute 4. mtr 5. whois... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-06T17:25:02+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Useful Linux Networking Commands &#8211; Part 1\",\"datePublished\":\"2013-01-06T17:25:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/\"},\"wordCount\":2245,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"Networking\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/\",\"name\":\"Useful Linux Networking Commands - Part 1 - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2013-01-06T17:25:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/useful-linux-networking-commands\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Useful Linux Networking Commands &#8211; Part 1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Useful Linux Networking Commands - Part 1 - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/","og_locale":"en_US","og_type":"article","og_title":"Useful Linux Networking Commands - Part 1 - Linux Shtuff","og_description":"Someone recently asked me what some of the more useful linux networking commands are and what some of the implementations are. Here is a compiled list for some of those commands: (click continue reading below first before using the links&#8230; long page is long) &nbsp; 1. netstat 2. ping 3. traceroute 4. mtr 5. whois... Read More","og_url":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2013-01-06T17:25:02+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Useful Linux Networking Commands &#8211; Part 1","datePublished":"2013-01-06T17:25:02+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/"},"wordCount":2245,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["Networking"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/","url":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/","name":"Useful Linux Networking Commands - Part 1 - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2013-01-06T17:25:02+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/useful-linux-networking-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Useful Linux Networking Commands &#8211; Part 1"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/4891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=4891"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/4891\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=4891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=4891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=4891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}