There are several ways to do this and the best way is to install a utility called “lsof” which you can find in /usr/ports/sysutils/lsof. Once you install this you will type:
# lsof -i
This will list out all the ports / ips / hostnames that are listening on your server. Another way would be to use the “netstat” command by typing:
# netstat --listen