LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 10-16-2005, 08:08 AM   #1
mfrangos79
Member
 
Registered: Jun 2005
Posts: 53

Rep: Reputation: 15
Exclamation close a port


Hi,
with 'nmap localhost' i can see that there is an uknown port .. 977/tcp .. is this dangerous? .. How can i close it?
(I use debian)
Thx in advance
 
Old 10-16-2005, 02:54 PM   #2
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 33
You can see what process use this port by:

Code:
/sbin/fuser 977/tcp
or you can close it by killing all process that use it

Code:
/sbin/fuser -k 977/tcp
 
Old 10-16-2005, 05:38 PM   #3
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
'lsof -i -n' will show you what process has each port open, then you can decide if you want to kill it and probably disable that service.
 
Old 10-16-2005, 07:50 PM   #4
mfrangos79
Member
 
Registered: Jun 2005
Posts: 53

Original Poster
Rep: Reputation: 15
I tried it and i got this error:

'bash: /sbin/fuser: No such file or directory'

I tried it as 'su' as well and the same error appeared
 
Old 10-16-2005, 08:30 PM   #5
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
On Debian fuser is in /bin and part of the psmisc package.
 
Old 10-17-2005, 07:29 PM   #6
mfrangos79
Member
 
Registered: Jun 2005
Posts: 53

Original Poster
Rep: Reputation: 15
i tried to kill it with the commands you have advised .. and now
'nmap localhost' says :
'978/tcp open unknown'
I tried to kill 978/tcp ...but it is still there
 
Old 10-18-2005, 02:08 PM   #7
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 33
And what process use this socket? Maybe, it re-spawns when you kill it.
 
Old 11-03-2005, 01:32 AM   #8
aruljose
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Rep: Reputation: 0
reply

i tried, it works.

[aruljose@aruljose aruljose]$ /sbin/fuser -k 1111/tcp
1111/tcp: 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622

aruljose
 
  


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 port should I close? schneemann Linux - Networking 5 11-15-2005 03:15 AM
cant get port 21 to close crosswire Linux - Newbie 4 09-14-2004 06:17 PM
help close port 6000 ronin4601 Linux - Newbie 6 04-23-2004 03:14 AM
is there a way to close the port X11 uses nakkaya Linux - General 5 02-08-2003 12:07 PM
port 6000, how to close it? neo77777 Linux - Security 2 05-16-2002 10:41 PM


All times are GMT -5. The time now is 07:02 PM.

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