File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mac OS and the fly likes See open ports in Mac? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "See open ports in Mac?" Watch "See open ports in Mac?" New topic

See open ports in Mac?

Edson Cezar
Ranch Hand

Joined: Mar 05, 2011
Posts: 97
There are a way to see at the prompt, open ports on mac, and block it, if possible ?

Thanks in advance !
Greg Charles

Joined: Oct 01, 2001
Posts: 2963

lsof | grep LISTEN

I just tried that though and it didn't seem to show me everything. As for blocking ports, that would be the job of firewall. I don't think that functionality is build into OSX, but I'm sure there are software firewalls available that you could install.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11765

You might want to look at Apple's OS X: About the application firewall page.

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
I agree. Here's the link:
subject: See open ports in Mac?
It's not a secret anymore!