LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2019, 04:52 PM   #1
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Rep: Reputation: Disabled
Ports - keep them or close them?


while diving into the networks, with command

Code:
$ sudo nmap -sUT -O localhost

Starting Nmap 7.60 ( https://nmap.org ) at 2019-05-05 23:48 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00040s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 1988 closed ports
PORT     STATE         SERVICE
22/tcp   open          ssh
111/tcp  open          rpcbind
139/tcp  open          netbios-ssn
445/tcp  open          microsoft-ds
631/tcp  open          ipp
68/udp   open|filtered dhcpc
111/udp  open          rpcbind
123/udp  open          ntp
137/udp  open          netbios-ns
138/udp  open|filtered netbios-dgm
631/udp  open|filtered ipp
5353/udp open|filtered zeroconf
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 - 3.10
Network Distance: 0 hops
i found a list of few ports which are open, which is great

Now considering security purposes,
should i keep all of them open, or close some of them as unnecessary?

Thanks
 
Old 05-05-2019, 06:37 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
From the man page:
Quote:
Open means that an application on the target machine is listening for connections/packets on that port.
Filtered means that a firewall, filter, or other network obstacle is blocking the port so that Nmap cannot tell whether it is open or closed.
Closed ports have no application listening on them, though they could open up at any time.
The question is: Does your computer need the listening applications. In your case, do you want to accept ssh, SMB, NTP etc. connections. If not, block the ports with a firewall and don’t run the applications.

Also, consider protecting the 1988 closed ports with a firewall.
 
  


Reply



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
open ports for utorrent using iptables n close smpt to that ports shtorrent00 Linux - Networking 2 09-30-2008 03:34 PM
Find open ports and close them geodo Linux - Newbie 7 11-18-2004 09:33 PM
Which ports should I keep open and which close?? apache Linux - Security 3 07-19-2004 08:31 AM
Ports, and how to close them? davee Linux - Networking 2 07-24-2003 08:10 AM
open ports... how do i close them? prodigius Linux - Security 3 01-18-2002 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:27 AM.

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