What is the port listening command?

Here is my story; bare with me, it does pertain to UNIX:

I have Intego Netbarrier installed. Last night I was surfing around in Firefox. I don't know if any of you know how Netbarrier work, but it lets you allow or block an outgoing connection from a specific program.

I opened Netbarrier up and looked at my Firefox settings. And it had a list for port 7000 and port 8444. If I remember correctly, port 7000 was blocked and 8444 was allowing outgoing connections through Firefox.

The thing that scared me, was that I don't remember ever being asked to set those rules for Netbarrier. And I'm wondering if something could be trying to use these ports for malicious activity.

I was wondering how do I find out what, if anything is using port 7000 or port 8444? I've used lsof -i but I'm kinda confused on how to read it. I don't see anything listed that lists the ports being used. I'm a Terminal newbie. Any help would be greatly appreciated.

And if you have any enlightenment on my first couple of paragraphs, that would be awesome. Thanks.

Posted on Oct 30, 2006 9:26 AM

Reply
16 replies

Oct 30, 2006 11:34 AM in response to FrozenInCarbonite

It is kind of a long story. The short version is that many people have been unnecessarily scared into spending a lot of money for security products that they don't need. If you have a wireless router or aren't running any servers on your Mac, then you don't need to block any incoming ports. You only need to block outgoing ports if you don't want your "legitimate" software to spy on you. There is just way too much security paranoia these days.

The long version is that you are 99.99% safe unless you do any of the following:
1) Use old versions of Windows
2) Use an unpatched version of Windows XP
3) Use Internet Explorer for Windows
4) Use Outlook for Windows
5) Do anything but delete unsolicited e-mail on Windows
6) Connect directly to the Internet instead of using a $10 hardware router such as a wireless router.
7) Run servers such as web servers or peer-2-peer software.

If you aren't doing anything on this list, you will be fine. Yes, there is still an extremely small risk, but that risk is virtually non-existent. You will never get to 100% safe. Trying to get from 99.99% safe to 99.9999999% will cost a lot of money, waste a lot of time, and make your computer virtually useless.

Just turn off everything in "Sharing" and you'll fine. No extra software needed. If you are really paranoid, download and buy Little Snitch for $25. It has a much better rating and is much more popular than Netbarrier

Oct 30, 2006 12:53 PM in response to FrozenInCarbonite

look on Macupdate.com or Versiontracker.com and get NMapFE a GUI front end for NMap. You run it from a different computer than the one you are scanning. I don't know if nMap is built-in enabled in the Mac or not, I can't remember how/where I got NMap up and running, whether it came with nMapFE, whether I got it from Fink, sourceforge.net, or what.

One variation of the longhand command would be nMap -sT -p {port list} -T{1-5, 1 slowest 5 fastest} {IP address of target computer}. Port list is like "0-65535" or "7000,8444,9000-90002"

Or, launch Network Utility in your (other computer's) /Applications/Utilities folder and go to the Port Scan panel. As with nMapFE, you really need to run this from a different computer than the one whose ports you are trying to scan.

However you accomplish it, be prepared to give 0-65535 a weekend to do it, though.



(if this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider marking this reply as "helpful" or "solved," in addition to, if applicable, marking this question as "answered")

Oct 30, 2006 1:39 PM in response to FrozenInCarbonite

Because "a web browser that uses port 80" isn't what you think it is. Port 80 is the default port for web servers; so the web browser on your system is connecting to port 80 on the server's system.

It would be rare for a browser to use port 80 on its own machine, and extremely rare for a UNIX-based system. Most non-server applications don't specify a particular port when they open local sockets; the O/S randomly assigns them one above 1000.

However, if you were to enable Personal Web Sharing, netstat should show that port 80 is LISTENING; that would be your Apache web server.

Nov 1, 2006 10:21 AM in response to FrozenInCarbonite

You would be better off posting a new thread; hijacking someone else's thread usually won't get the attention of the right people. Usually.

In this case, I can say that that is the difference between an admin user and a non-admin user; admin users can sudo. Remember that "sudo" means "do as super-user"; it assigns the process executing the target command "root" privileges. This is powerful and potentially dangerous (e.g., "sudo rm -rf /". Don't do that. Just don't.). Users to whom you want to provide such power should be administrators.

Powerbook G4 1GHz Mac OS X (10.3.9)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

What is the port listening command?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.