Kill UDP port that has no process?
- by Chocohound
I can't bind to UDP port 500 from my code (yes I'm running w/ sudo). The port is reported as "already in use" (Mac os X), but doesn't have an associated process:
$ sudo netstat -na | grep "udp.*\.500\>"
udp4 0 0 192.168.50.181.500 *.*
udp4 0 0 192.168.29.166.500 *.*
But sudo lsof doesn't show a process on port 500 (ie sudo lsof -i:500 -P reports nothing).
How can I unbind port 500 so I can use it again? I believe I have a bad VPN client that isn't cleaning up after itself, but I can't get rid of this without rebooting the machine.