[CALUG] More UDP foolishness

Jim Sansing jjsansing at comcast.net
Fri Apr 14 00:00:54 CDT 2006


Traceroute has a port option if you just want to check for whether a
specific
port has a listener.  However, traceroute adds 1 to the port for each
hop, so
you have to know how many hops away your destination is (subtract 1 for
the local subnet).  It appears from testing it on my home network, that if
the port does not have a listener, you get 1 '*' on the final hop.  If
it does
have a listener, you just get the host plus roundtrip stats.

If it's on the local subnet, not so bad, but if you're checking a work host
from home, it might be inconsistent.  Plus, some routers/firewalls block
traceroute (at least the default port + n).

If you're doing this frequently, it shouldn't be hard to write something in
Perl to do exactly what you want, and that should be portable to most *nix
systems.  If you have a web site or run sshd at home, you could grab it
fairly
easily wherever you are.

Later . . .   Jim


Jason C. Miller wrote:
>Yeah...but I would hardly call nmap a common utility (at least, not 
>NEARLY as common as something like telnet).  I also mentioned that nmap 
>is something that I'm using currently and don't want to have to rely 
>since I don't want to have to install it wherever I go. 
>
>                                                  -j
>
>
>Kelly Price wrote:
>
>  
>>On 4/13/06, Jason C. Miller <jason.c.miller at gmail.com> wrote:
>> 
>>
>>    
>>>Oh...almost forgot.  The UDP port in question doesn't reside on your
>>>local machine.  Therefore, 'netstat' and other tools like that don't
>>>apply.  ;)
>>>
>>>   
>>>
>>>      
>>So we're looking at a remotely connected PC.
>>
>>We need to know where you are connected in relation to that PC, and if
>>your laptop has Linux on it.
>>
>>* If it's on a local network (wire/wireless), nmap.
>>* If it's not, but the PC has an direct IP address and so do you, nmap.
>>* If ether end is firewalled or behind a NAT router, you're screwed!
>>
>>
>>
>> 
>>
>>    
>>>                                                              -j
>>>
>>>Jason C. Miller wrote:
>>>
>>>   
>>>
>>>      
>>>>Heck....why not!  Here's my random question for the week...  :)
>>>>
>>>>So, anyway, a lot of troubleshooting and investigation is required with
>>>>the stuff that I work on.  For as long as I can remember, I've used
>>>>'telnet' as the simplest way to determine whether or not a TCP port is
>>>>bound to by an application on a machine.  It's simple, quick, easy, and
>>>>comes stock on just about every OS imaginable.  It's a good way to
>>>>verify that the 3-way-handshake works on a given port.
>>>>
>>>>However...
>>>>
>>>>Can't say it's been quite that simple for the UDP side of the house.
>>>>Since UDP is connectionless, the mechanisms for determining if a port is
>>>>bound to is a tad different.  Instead of conveniently getting a
>>>>(RST,ACK) TCP reply, UDP relies on the receipt of ICMP 'Destination
>>>>Unreachable' messages to tell it that the port is not open.  Typically,
>>>>I've relied on applications like nmap.  However, I don't really feel
>>>>like installing it wherever I go.  I've also written simple progs to do
>>>>it, but it's very inconvenient.
>>>>
>>>>So, the question is....can anybody recommend a COMMON program that you
>>>>would find on most operating systems that could be pointed at an
>>>>arbitrary UDP port and would tell you the status of that port?  Seems
>>>>like it'd be simple, but I can't seem to think of any at the moment.
>>>>
>>>>                                                     -j
>>>>_______________________________________________
>>>>Columbia, Maryland Linux User's Group (CALUG) mailing list
>>>>CALUG Website: http://www.calug.com
>>>>Email postings to: lug at calug.com
>>>>Change your list subscription options: http://calug.com/mailman/listinfo/lug
>>>>
>>>>
>>>>     
>>>>
>>>>        
>>>--
>>>***************************************************
>>>My blog: http://millersplace.blogspot.com/
>>>***************************************************
>>>
>>>_______________________________________________
>>>Columbia, Maryland Linux User's Group (CALUG) mailing list
>>>CALUG Website: http://www.calug.com
>>>Email postings to: lug at calug.com
>>>Change your list subscription options: http://calug.com/mailman/listinfo/lug
>>>
>>>   
>>>
>>>      
>>--
>>Kelly "STrRedWolf" Price
>>http://strredwolf.furrynet.com
>> 
>>
>>    
>
>
>  


More information about the lug mailing list