Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Proving a UDP port is closed

by Limbic~Region (Chancellor)
on Feb 01, 2011 at 15:00 UTC ( [id://885510]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Proving a UDP port is closed
in thread Proving a UDP port is closed

davis,
The netstat command shows network information and is not concerned with what services/processes are running. Also, inetd isn't magical and can't establish a connection without a listener. In order for the server to accept connections on a port then there has to be a listener for that port. The netstat command can be used to show what listeners are out there.

As far as proving it by attempting to connect to it, I would have no way of testing presently.

Cheers - L~R

Replies are listed 'Best First'.
Re^4: Proving a UDP port is closed
by davis (Vicar) on Feb 01, 2011 at 15:11 UTC
    Sorry, I realised the stupidity of what I'd said (the implied magic) fairly quickly! Yeah, grokking the "netstat -af inet" output would almost certainly work for me for both TCP and UDP listeners, but there's still something somehow... cleaner about the attempted connection method, at least in my head.

    davis

      Is it possible for a listener to black-hole the port, and soak up messages (possibly acting on them) with no replies or indication that it has happened to the outside world?

      Such a case would require checking for listener processes rather than just shouting at the computer and waiting for echoes.

        Another good point. I suppose I could have "nc -lu 111" or similar running, and that might appear to be the same as "unreachable".

        I think this is nudging me down the netstat/lsof route...

        davis

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://885510]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2026-01-24 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.