Using Ubuntu Server 16. Something on my machine has an SCTP port open, and I need to find it and kill it (without rebooting).
lsof
doesn't show SCTP sockets, only TCP and UDP.
I'm looking through all these network utilities, and SCTP support is surprisingly scarce for such an old standard. I got netstat
to work with SCTP by building the bleeding edge net-tools from here. sudo netstat --sctp -tulpn
shows some open SCTP connections but doesn't say which process has them. It only shows the PIDs for UDP and TCP sockets.
Best Answer
Sort of a hacky roundabout way but it seems to work for me. Hoping someone will find a better way, but my first thoughts (ss/netstat) don't seem to acknowledge SCTP.
First, use
procfs
to find the inode of the sctp connection:Take that inode (1895802 in my example) and use
lsof
to find who owns it:As you can see, I was using
socat
to make a socket listening on 123/sctp. 8697 is the pid.