LinuxCommandLibrary

tcptraceroute

TLDR

Trace route to a host

$ tcptraceroute host
copy
Trace to specific destination port
$ tcptraceroute host 80
copy
Specify source port and address
$ tcptraceroute host -p 12345 -s 192.168.1.10
copy
Set first and maximum TTL
$ tcptraceroute host -f 1 -m 30
copy
Set wait time and queries per hop
$ tcptraceroute host -w 3 -q 3
copy
Specify network interface
$ tcptraceroute host -i eth0
copy
Use numeric output only
$ tcptraceroute -n host
copy

SYNOPSIS

tcptraceroute [options] host [destinationport] [packetlength]

DESCRIPTION

tcptraceroute is a traceroute implementation using TCP packets. It can trace through firewalls that block traditional ICMP or UDP traceroute packets by using TCP SYN packets to a specified port.

PARAMETERS

-p PORT

Set local source port
-s ADDRESS
Set source IP address
-i INTERFACE
Specify network interface to use
-f TTL
Set the initial (first) TTL value
-m TTL
Set the maximum TTL value (default: 30)
-w SECONDS
Set the timeout for each probe (default: 3)
-q QUERIES
Set number of queries per hop (default: 3)
-n
Print numeric addresses only (no DNS resolution)
-N
Enable lookup of hostnames
-S
Set SYN flag on outgoing packets
-A
Set ACK flag on outgoing packets
-E
Set ECN flag on outgoing packets

CAVEATS

Requires root privileges or appropriate capabilities to send raw packets. The destination port defaults to 80 (HTTP). Some firewalls may still block TCP probes depending on their configuration.

HISTORY

tcptraceroute was created as an alternative to traditional traceroute that could bypass firewalls blocking ICMP and UDP packets by using TCP SYN packets.

SEE ALSO

traceroute(8), mtr(8), tracepath(8)

> TERMINAL_GEAR

Curated for the Linux community

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

$129.95
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

$1,589.00
nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

$129.95
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00