TCPTRACEROUTESection: Maintenance Commands (8)
Updated: 2001 July 31
Return to Main Contents
NAMEtcptraceroute - A traceroute implementation using TCP packets
SYNOPSIStcptraceroute [-nFE] [ -i interface ] [ -f first ttl ]
[ -l length ] [ -q number of queries ] [ -t tos ]
[ -m max ttl ] [ -p source port ] [ -s source address ]
[ -w wait time ] host [ destination port ] [ length ]
DESCRIPTIONtcptraceroute is a traceroute implementation using TCP packets. The more traditional traceroute(8) sends out either UDP or ICMP ECHO packets with a TTL of one, and increments the TTL until the destination has been reached. By printing the gateways that generate ICMP time exceeded messages along the way, it is able to determine the path packets are taking to reach the destination. The problem is that with the widespread use of firewalls on the modern Internet, many of the packets that traceroute(8) sends out end up being filtered, making it impossible to completely trace the path to the destination. However, in many cases, these firewalls will permit inbound TCP packets to specific ports that hosts sitting behind the firewall are listening for connections on. By sending out TCP SYN packets instead of UDP or ICMP ECHO packets, tcptraceroute is able to bypass the most common firewall filters. It is worth noting that tcptraceroute never completely establishes a TCP connection with the destination host. If the host is not listening for incoming connections, it will respond with an RST indicating that the port is closed. If the host instead responds with a SYN|ACK, the port is known to be open, and an RST is sent by the kernel tcptraceroute is running on to tear down the connection without completing three-way handshake. This is the same half-open scanning technique that nmap(1) uses when passed the -sS flag.
EXAMPLESPlease see the examples.txt file included in the tcptraceroute distribution for a few real world examples. To trace the path to a web server listening for connections on port 80:
BUGSNo error checking is performed on the source address specified by the -s flag, and it is therefore possible for tcptraceroute to send out TCP SYN packets for which it has no chance of seeing a response to. Complete portability to other Unix systems has not been tested; specifically, tcptraceroute will not function on systems which modify the IP ID field of packets written to a raw socket. As of the time of this writing, tcptraceroute is known to compile and function properly on Linux, OpenBSD, and FreeBSD systems. If you run into complications on another platform, please let me know.
AUTHORMichael C. Toren <firstname.lastname@example.org>
AVAILABILITYFor updates, please see:
SEE ALSOtraceroute(8), ping(8), nmap(1)
This document was created by man2html, using the manual pages.
Time: 00:12:46 GMT, March 05, 2024