lsof is an expensive command to run.. if you're looking specifically for TCP/UDP socket descriptors better to drill down to the specifics with lsof -nP -a -i
then listing all active file descriptors and grepping.
I prefer to use netcat(1),nc(1) to test port firewall traversal then telnet. assuming i don't have nmap/hping etc.. around.
dbsd:~ $ nc -vz www.google.com 80
Connection to www.google.com 80 port [tcp/http] succeeded!