LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2009, 01:11 PM   #1
caibbor
LQ Newbie
 
Registered: Dec 2009
Posts: 27

Rep: Reputation: 0
trace route on a specific port


say I've got a few systems which forward ports to one another all over the place, and somewhere along the line a port forward fails. I want to trace the route of a connection on a specific port to see where the connection hits a wall, to see what system is causing the problem.

any way to do this?

I've tried `tracetoure -T -p <port>` but it doesn't output anything about the ports it hits, stops when it hits the address I supplied even though it is forwarded elsewhere, and there doesn't seem to be a verbose mode.

interstingly, if I specify a different source port via the '-s' option, the trace keeps hopping to * * * * and never get anywhere (at least to 27 hops then I CTRL+C)

Last edited by caibbor; 12-04-2009 at 01:14 PM.
 
Old 12-04-2009, 03:02 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
I've never used tracetoure, however you can use traceproto with the destination port option and it should provide the information you need.
 
Old 12-04-2009, 04:25 PM   #3
caibbor
LQ Newbie
 
Registered: Dec 2009
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rweaver View Post
I've never used tracetoure, however you can use traceproto with the destination port option and it should provide the information you need.
thanks. however the traces from both tcptraceroute and traceproto (tcp) both just get no response, which is weird. there is definitely a port forwarded to a service on another machine, an http server, and I can load it in a browser.

the machine I'm traceing is also got a local sshd running and working well, and tcp'ing to that port also results in no response with these tools.

er? why?

I"m even doing these from within the same network, so no NAT is happening.
 
Old 12-04-2009, 04:47 PM   #4
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Quote:
Originally Posted by caibbor View Post

I've tried `tracetoure -T -p <port>` but it doesn't output anything about the ports it hits
-T = Use TCP instead of UDP packets when probing the route.

-p port = Specifies the UDP destination port base traceroute will use.

I don't think you know:
1. what are you doing
2. why you are doing this
3. what do you exactly need.

So please read carefully "man traceroute" .
 
Old 12-05-2009, 01:20 PM   #5
caibbor
LQ Newbie
 
Registered: Dec 2009
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nimnull22 View Post
-T = Use TCP instead of UDP packets when probing the route.

-p port = Specifies the UDP destination port base traceroute will use.

I don't think you know:
1. what are you doing
2. why you are doing this
3. what do you exactly need.

So please read carefully "man traceroute" .
no, sir, I think YOU don't understand what I'm trying to do. I need to know what system is accepting (or traveling through) my TCP (hence -T) connection on port 443 (hence -p). it would seem logical that -p would use TCP instead of UDP with the -T option. that is, after all, the point.
 
Old 12-05-2009, 01:43 PM   #6
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by caibbor View Post
no, sir, I think YOU don't understand what I'm trying to do. I need to know what system is accepting (or traveling through) my TCP (hence -T) connection on port 443 (hence -p). it would seem logical that -p would use TCP instead of UDP with the -T option. that is, after all, the point.
I may be wrong, but isn't tcptraceroute what you need ?

The -p of traceroute isn't about testing ports. Tcptraceroute sends
TCP SYN packets to a specific port so it can do what you want.

Last edited by imitheos; 12-05-2009 at 01:46 PM.
 
Old 12-07-2009, 10:23 AM   #7
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by caibbor View Post
thanks. however the traces from both tcptraceroute and traceproto (tcp) both just get no response, which is weird. there is definitely a port forwarded to a service on another machine, an http server, and I can load it in a browser.

the machine I'm traceing is also got a local sshd running and working well, and tcp'ing to that port also results in no response with these tools.

er? why?

I"m even doing these from within the same network, so no NAT is happening.
It's possible one of the redirects in the chain isn't a network level redirect and is a webserver perm redirect or something similar.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
route add with specific interface jonaskellens Linux - Networking 4 04-21-2009 12:51 AM
trace route a server jkeertir Linux - Hardware 7 04-03-2008 08:15 PM
Need to route traffic through specific nic cards... Thaidog Linux - Networking 4 07-01-2005 07:31 PM
route locally generated traffic to ip:port to localhost:port maenho Linux - Software 2 03-11-2005 04:08 AM
linux trace route won't work Red Squirrel Linux - Software 3 03-17-2004 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration