LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-18-2004, 09:46 AM   #1
geodo
LQ Newbie
 
Registered: May 2004
Posts: 12

Rep: Reputation: 0
Find open ports and close them


Hi,

I am setting up a server running SuSE 9.1.
And I'm looking for a way to find out what ports are open and how I can close them.

Thanx a bunch!
 
Old 11-18-2004, 09:59 AM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
one method is to put it on the net, run nmap or similar app from another machine (well, ought to work from the same machine too, but it doesn't hide those ports that are set to DROP all traffic, so it's not quite the same) to determine which ports are open and which closed. then the ports can be closed either by closing the services that are open on them, or then by a firewall like iptables if it's enabled in your kernel....probably is if it's a stock one
 
Old 11-18-2004, 10:43 AM   #3
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
nmap is okay..... but you need a second machine to run the scan from, and it takes a few minutes....

most people just use 'netstat'

the only time you need nmap for your own machine is if you suspect that your machine may have been hacked and rooted.
 
Old 11-18-2004, 11:14 AM   #4
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I disagree on that. it's great also when you're setting up network security and want to test it..and that was the first app that came to my mind
 
Old 11-18-2004, 11:25 AM   #5
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
yeah, nmap is great... but if you dont have 2 computers,,, or youu would rather get results instantly than have to wait a minute or 2... then netstat.

netstat will give the same results exactly (unless you are hacked and rooted)
 
Old 11-18-2004, 12:20 PM   #6
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Posts: 1,658

Rep: Reputation: 138Reputation: 138
To find your open ports, do a Shields UP scan.

https://grc.com/x/ne.dll?bh0bkyd2

The easy way to close them is to use SuSE Firewall 2 to close the open ports...
 
Old 11-18-2004, 05:57 PM   #7
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
again, shiuelds up scan will take atleast 30 minutes to do a complete port scan....

why not do it properly !!! netstat !
there's the right way, and the slow way.
 
Old 11-18-2004, 09:33 PM   #8
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
You don't need a second machine to run nmap. All you need to do is point nmap at your eth0 ip. "nmap eth0ip" eth0ip being your ip address, of course use your favorite flags.. But I agree netstat -anp is better.

Last edited by peacebwitchu; 11-18-2004 at 09:38 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which ports should I keep open and which close?? apache Linux - Security 3 07-19-2004 08:31 AM
how to close open ports mayagenesis Linux - Networking 1 07-31-2003 12:47 AM
How do i close my open ports??? Synth218 Slackware 10 07-06-2003 02:31 PM
open ports... how do i close them? prodigius Linux - Security 3 01-18-2002 08:35 AM
how to close open ports zyan Linux - Security 3 08-04-2001 08:11 PM


All times are GMT -5. The time now is 09:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration