Q

Closing a port

I have found port 1521 open on my system. Since I dont have ncube, I want to follow your suggestion and shut the port down to see what breaks. How do I shut down a port?


Remember I also said that port 1521 is used by a number of SQL programs, so if you are running any sort of database server, that may be the answer to your question.

However, if you want to find out what is running on which port of your system, it's reasonably easy to figure that out. Alas, you didn't tell me what operating system you're running, so it's hard to give specific details.

However, under most Unixes, the "netstat" program will tell you what ports are being used by what process number. So "netstat | grep 1521" should show you what process number is using port 1521, then you can use "ps" to tell you what that process number is running. Under Linux (and some others) there is a -p option to netstat that will tell you what program and process number is using that port. Under BSD Unix, the "sockstat" command will do similar things.

Under Windows NT and 2000, there is also a netstat command, but it doesn't tell you what process numbers are using the ports, only that the ports are in use, so you will need to look at the task manager and make some intelligent guesses.


This was first published in July 2001

Dig deeper on Security Resources

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudSecurity

SearchNetworking

SearchCIO

SearchConsumerization

SearchEnterpriseDesktop

SearchCloudComputing

ComputerWeekly

Close