mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* How to find information about kernel based open ports?
@ 2023-04-25 15:18 John Fleming
  0 siblings, 0 replies; only message in thread
From: John Fleming @ 2023-04-25 15:18 UTC (permalink / raw)
  To: linux-kernel

Is there anyway to query to the kernel for open sockets? This is more from an administrative point of view. For example NFSD.ko and VXLAN.ko can create listening sockets (maybe that isn't the correct term). I was going to ask if I can tell which kernel module had a port open, but I guess in theory a module could be built into the kernel so I'm really not sure how to propperly ask the question.

But basically is their a way to query the kernel for open sockets in the case of a socket being opening by the kernel and not say a process.

Here is the best I can find using netstat. I see the PID/Program name is "-" which tells me it's the kernel (I think), but I don' t know anything beyond that. If I unload vxlan the listening port goes away, but that is more trial and error.

root@compute01:/proc/net# netstat -nlp | egrep -- '4789|PID'
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:4789            0.0.0.0:*                           -
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
root@compute01:/proc/net#

My goal would be have some information about all kernel based listeners, hopefully beyond it's the kernel listening (it's the nfs subsystem, vxlan, whatever else).

Please CC me on all replies as I'm not subscribed.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-25 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 15:18 How to find information about kernel based open ports? John Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®