0

I recently did a port scan (using www.ipfingerprints.com) on my Ubuntu 18.04 server and found a number of ports that I did not open. Here are the open ports:

PORT    STATE    SERVICE
22/tcp  open     ssh
25/tcp  open     smtp
80/tcp  open     http
111/tcp filtered rpcbind
135/tcp filtered msrpc
136/tcp filtered profile
137/tcp filtered netbios-ns
138/tcp filtered netbios-dgm
139/tcp filtered netbios-ssn
443/tcp open     https
445/tcp filtered microsoft-ds
513/tcp filtered login
520/tcp filtered efs

Except for 22, 25, 80 and 443, I did not open the rest of these ports. Why are they open, and will it affect my server performance if I close all of these ports?

1
  • filtered means they are blocked by a firewall. Aug 1, 2019 at 5:53

3 Answers 3

2

Execute ss -tunapl to see which programs open the ports. Disable the services that are not needed, using systemctl disable <service-name>.service.

The above list looks like samba and related services are running.

2
  • I'd rather say the hoster has blocked these ports. They don't have to be running. Aug 1, 2019 at 6:05
  • ss -tunapl gives a very good breakdown of what ports are open. Thanks!
    – John Doe
    Aug 2, 2019 at 1:29
3

Those ports are not open. Filtered means they are blocked by a firewall, and that doesn't mean that without this firewall the port would be open. They are probably just closed.

Verify with netstsat -tanp|grep LISTEN

1
  • Except you want to use ss instead of netstat, which has been obsolete for years and is not typically installed by default on modern Linux systems. Aug 1, 2019 at 6:24
1

nmap indicating "filtered" simply means that the packets are being blackholed somewhere between your nmap client and the target being scanned. 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.-- http://nmap.org/book/man.html Ref: https://security.stackexchange.com/questions/14706/found-unusual-services-running-on-my-vps

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .