Ask the Community
Groups
TCPDUMP and Other Networking Tools - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="summary"><strong>SUMMARY</strong></h2> <p>TCPDUMP and Other Networking Tools</p> <h2 data-id="issue"><strong>ISSUE</strong></h2> <p></p> <h3 data-id="purpose">Purpose</h3> <p>This article provides examples for the uses of the tcpdump command to diagnose and troubleshoot various networking issues.</p> <h3 data-id="applies-to">Applies To</h3> <p>All Unitrends backup appliance software versions</p> <h3 data-id="tcpdump">TCPDUMP</h3> <p>tcpdump - dump traffic on a network</p> <h4 data-id="examples">Examples</h4> <p>Show incoming packets on port 1194 <b>from</b> source 24.39.64.20</p> <blockquote class="blockquote"> <p><span style="font-family: courier;">tcpdump -lnni eth0 port 1194 and src host 24.39.64.20</span></p> </blockquote> <p><br>Show outgoing packets on port 1194 <b>to</b> destination 24.39.64.20</p> <blockquote class="blockquote"> <p><span style="font-family: courier;">tcpdump -lnni eth0 port 1194 and dst host 24.39.64.20</span></p> </blockquote> <p><br>Show contents of packets</p> <blockquote class="blockquote"> <p><span style="font-family: courier;">tcpdump -lnni eth0 -s0 -x port 1194 and src host 24.39.64.20</span></p> </blockquote> <p> </p> <h3 data-id="iptables">IPTABLES</h3> <p>iptables - administration tool for IPv4 packet filtering and NAT</p> <h4 data-id="display-firewall-rules">Display Firewall Rules</h4> <blockquote class="blockquote"> <p><span style="font-family: courier;">iptables -L</span></p> </blockquote> <p> </p> <h3 data-id="route">ROUTE</h3> <p>route -- manually manipulate the routing tables</p> <h3 data-id="examples-1">Examples</h3> <p>List routing table</p> <blockquote class="blockquote"> <p>route</p> </blockquote> <p>Set default gateway</p> <blockquote class="blockquote"> <p>route add default gw 192.168.0.1 eth0</p> <p>Static routes</p> <p>/etc/sysconfig/network-scripts/route-eth0</p> <p><br>10.10.10.0/24 via 192.168.0.1 dev eth0</p> <p>172.16.1.0/24 via 192.168.0.1 dev eth0</p> <p> </p> </blockquote> <h3 data-id="wget">WGET</h3> <p><br>Determine external ip address</p> <blockquote class="blockquote"> <p>wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'</p> </blockquote> <h3 data-id="third-party-links">Third Party Links</h3> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fwww.tcpdump.org%2Ftcpdump_man.html">TCPDUMP Man Page</a></p> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Flinux.die.net%2Fman%2F8%2Froute">ROUTE Man Page</a></p> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fwiki.centos.org%2FHowTos%2FNetwork%2FIPTables">CentOS: IPTABLES</a></p> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Flinux.die.net%2Fman%2F1%2Fwget">WGET Man Page</a></p> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fwww.cyberciti.biz%2Ftips%2Fconfiguring-static-routes-in-debian-or-red-hat-linux-systems.html">http://www.cyberciti.biz/tips/configuring-static-routes-in-debian-or-red-hat-linux-systems.html</a></p> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fdocs.redhat.com%2Fdocs%2Fen-US%2FRed_Hat_Enterprise_Linux%2F5%2Fhtml%2FDeployment_Guide%2Fs1-networkscripts-static-routes.html">http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s1-networkscripts-static-routes.html</a></p> <p><a rel="nofollow" href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fwww.cyberciti.biz%2Ffaq%2Flinux-setup-default-gateway-with-route-command%2F">http://www.cyberciti.biz/faq/linux-setup-default-gateway-with-route-command/</a></p> <h2 data-id="notes"><strong>NOTES</strong></h2> <p>Brandon Nelson - 6/18/2018 - Removed broken link. <br>20180809jmaynard- updated link<br>20191114jmaynard - updated link</p> </article> </main>