LinuxQuestions.org
Help answer threads with 0 replies.
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 02-08-2008, 09:44 AM   #1
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Rep: Reputation: 30
How to open and close ports on command line ?


Hello there,
I have no firewall installed on a linux box and after running nmap have found that there are three open ports

Code:
[root@PCLOS2007 ~]# nmap 127.0.0.1

Starting Nmap 4.20 ( http://insecure.org ) at 2008-02-08 14:25 GMT
Interesting ports on PCLOS2007 (127.0.0.1):
Not shown: 1694 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds
AS I am not running iptables etc, just for curiosity's sake,
what would be the best way to open and close ports via command line ?
One could edit the inetd.conf file but this is becoming redundant in a lot of Linux flavours.
I would like to open port 79 so that I can finger from another machine.Is there a manual way of opening / close this port or is the port opened by the finger daemon at start-up ?

Thanks again,

uc.

Last edited by uncle-c; 02-08-2008 at 09:52 AM.
 
Old 02-08-2008, 11:23 AM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
An "open" port is created by the service running on that port performing the listen() call to listen for incoming requests.
 
  


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
how to close open ports glorsplitz Linux - Networking 3 09-30-2006 11:10 AM
Which ports should I keep open and which close?? apache Linux - Security 3 07-19-2004 09:31 AM
how to close open ports mayagenesis Linux - Networking 1 07-31-2003 01:47 AM
How do i close my open ports??? Synth218 Slackware 10 07-06-2003 03:31 PM
open ports... how do i close them? prodigius Linux - Security 3 01-18-2002 09:35 AM


All times are GMT -5. The time now is 10:23 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