FreeBSD Check TCP/UDP Open Port or Services
Prasetiyo Hadi Purwoko
- One minute read - 93 wordsIn this short tutorial I will show how to check TCP/UDP open port or services in FreeBSD box. For checking open port or services which uses port in FreeBSD simply issue the following commands.
-
check TCP connection
sockstat -Ptcp -
check UDP connection
sockstat -PudpCombine with grep to search port used by specific service or service which using specific port.
-
use grep to get service or port
sockstat -Ptcp | grep <port number> sockstat -Ptcp | grep -i <service name> sockstat -Pudp | grep <port number> sockstat -Pudp | grep -i <service name>