Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
I was wondering if you guys would be so kind as to look at my nmap results. Code: nathacof@smolderingAshPit:~$ nmap localhost Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2004-11-19 11:33 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2004
    Posts
    53

    Open ports.


    I was wondering if you guys would be so kind as to look at my nmap results.
    Code:
    nathacof@smolderingAshPit:~$ nmap localhost
    
    Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2004-11-19 11:33 EST
    Interesting ports on localhost (127.0.0.1):
    (The 1656 ports scanned but not shown below are in state: closed)
    PORT     STATE SERVICE
    22/tcp   open  ssh
    37/tcp   open  time
    113/tcp  open  auth
    139/tcp  open  netbios-ssn
    445/tcp  open  microsoft-ds
    631/tcp  open  ipp
    6000/tcp open  X11
    I know I should disable X11 but I've never figured out how to actually get that port closed. Also I don't think I need port 37 open... do I? auth is for ssh right? and netbios-ssn and microsoft-ds are for samba. Are these secure to have open? Or should I only open them when I need to use samba?

    Thanks in advance for your help.

  2. #2
    Linux Engineer kriss's Avatar
    Join Date
    Jun 2003
    Posts
    1,113
    Why would you want to close X11?

    Take a look in /etc/inetd.conf, /etc/rc.d/rc.inet1 & inet2. You can also disable some services by chmod -x /etc/rc.d/rd.sshd as one example.

  3. #3
    Just Joined!
    Join Date
    Jul 2004
    Posts
    53
    Why would I not want to disable X11? I don't need my screen forwarded to another computer or anything like that.

    And thanks I'll check that out.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058
    Construct - You do not want 6000 open infact my friends box got rooted last weekend and they started that service. It is a huge security risk and if you didn't turn on the service I would check you logs to see if you got rooted too but if not here is the way to stop the port.

    startx -- -nolisten tcp

    Good Luck
    Mike

  6. #5
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131
    after reading your post i run 'nmap localhost' on my box and i saw that I have got the same number of ports open plus a similar one - I gather from the various replies to your post that could be safer if they are close i.e.: port 6000/X11 -

    so, my question is: how do I close the ports that I don't want to be open?

    thanx`for the help
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

  7. #6
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058
    Most of the time you can do a search on google for that port, and it will usually tell you what it is and how to turn it off.

    Usually ports are turned on and off by the service that uses them. So if you turn off ftp then port 21 closes.

    You can also deny all except on your firewall if you want to use that service internally.

    I hope this helps,
    Mike

  8. #7
    Linux Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    131
    Most of the time you can do a search on google for that port, and it will usually tell you what it is and how to turn it off. Usually ports are turned on and off by the ..............

    Cool!!!

    I run nmap on verbose prompt and it gave me port 6000/X11 as closed -

    Thanx
    If you get on the wrong train all the stations you will come to will be the wrong stations.
    Zen

  9. #8
    Linux Engineer adrenaline's Avatar
    Join Date
    Aug 2004
    Location
    Seattle, Washington
    Posts
    1,058

  10. #9
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    Hi
    the easiest way to "shut down" the port opening, is to set the options in the proper ARG

    go in
    /usr/X11R6/bin
    edit startx

    you will see the last serverargs=""
    simply add this args "-nolisten tcp"
    save it...
    you can restart the X
    or reboot
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  11. #10
    Just Joined!
    Join Date
    Jul 2008
    Posts
    1

    inittab

    I also try "nmap" on my box and got port 6000 open for X11.

    If wanted to just close port 6000...
    Just edit: /etc/inittab
    change id:5:initdefault: to id:3:initdefault:

    Then reboot the box.. port 6000 was not open anymore.


    I hope it answers your query.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •