-   Linux - Newbie (
-   -   How to open and close ports on command line ? (

uncle-c 02-08-2008 09:44 AM

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


[root@PCLOS2007 ~]# nmap

Starting Nmap 4.20 ( ) at 2008-02-08 14:25 GMT
Interesting ports on PCLOS2007 (
Not shown: 1694 closed ports
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,


Matir 02-08-2008 11:23 AM

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

All times are GMT -5. The time now is 05:56 AM.