What is the BSD equivalent of Linux `netstat -lptun`?

The command you want is sockstat. Use sockstat -4l to see just IPv4 listening sockets


On FreeBSD specifically, sockstat(1) is indeed useful.

You could also use fstat(1) on not just FreeBSD, but all modern BSD systems apart from OS X, although I guess fstat will only report presently open sockets each process may have, not the already closed ones recently. E.g., to omit non-internet files, try fstat | fgrep -e internet -e USER.

See also How to list open files on a UNIX system.