Sockstat output for Incoming Connections on UDP

Hi
I'm running FreeBSD 13.1 with unbound installed on it.
This is server is used as a DNS server.
I need to see the UDP connections to my server, but somehow I don't understand why it's not showing the foreign connection from outbound to port 53 on the server.

It shows correctly on TCP for the ssh port.
Code:
[~@named#] sockstat -c -P tcp
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
eng      sshd       72059 4  tcp4   172.17.23.74:2730     10.212.128.11:8669
root     sshd       72057 4  tcp4   172.17.23.74:2730     10.212.128.11:8669


But not for UDP. it just prints my server outbound connections toward port 53, I need the connections to my port 53 on UDP.
Code:
[~@named#] sockstat -c -P udp
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
unbound  unbound    2758  131 udp4  172.17.23.74:22894    165.227.133.206:53
unbound  unbound    2758  132 udp4  172.17.23.74:56903    178.128.191.122:53
unbound  unbound    2758  135 udp4  172.17.23.74:24917    199.19.53.1:53
unbound  unbound    2758  136 udp4  172.17.23.74:41317    199.19.56.1:53
unbound  unbound    2758  139 udp4  172.17.23.74:8604     178.128.191.122:53
unbound  unbound    2758  141 udp4  172.17.23.74:27370    199.19.53.1:53
unbound  unbound    2758  143 udp4  172.17.23.74:21225    188.166.56.96:53
unbound  unbound    2758  155 udp4  172.17.23.74:27181    165.227.133.206:53
unbound  unbound    2758  157 udp4  172.17.23.74:17846    199.19.53.1:53
 
Last edited by a moderator:
Googling for 'udp pinhole' and 'udp hole punching' will probably prove insightful. In short, systems may preserve a pseudo-state for NAT and firewalling purposes.
 
Back
Top