LinuxQuestions.org
Review your favorite Linux distribution.
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, 08:44 AM   #1
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Ubuntu 16.04.7 LTS, Kali, MX Linux with i3WM
Posts: 299

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 08:52 AM.
 
Old 02-08-2008, 10:23 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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 10:10 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration