I am new to Ubuntu (I installed it just 4 days ago) and want to know something about network ports: which port is opened or closed?

I read many answers about this field, but I am unable to understand how to identify ports (opened or closed). When I run this command sudo netstat -ntlup I get the following output:


Could you tell me, which port is open or at risk? How to close open ports using firewall rules?

  • Nothing seems out of order with the ports that are open in your list. By default, no ports are opened in Linux unless a service specifically opens them. Unless you have installed a firewall like ufw, ports are typically managed through iptables for which you can read man iptables in Terminal.
    – douggro
    Jan 24, 2015 at 19:28

1 Answer 1


Your answer depends on what your definition of "open ports" are:

  1. if you mean by "open ports", the ports that are open on your internal LAN, then the netstat command is very useful and looking at the output of your command, the open ports are absolutely normal for a computer that:

    • uses DNS
    • uses DHCP
    • has a printer defined ans wants to share it.
  2. if you mean by "open ports", the ports that are visible to the Internet, then the netstat command is not very useful and there are tons of sites out there that can test your Internet connectivity. Here's just one of the oldest and best

  • 1
    Thank you guys,and yes I want to know about the ports that are visible to the internet.Again thank you both of you.
    – kamal
    Jan 27, 2015 at 13:30
  • If you want to know as much about networking as me, buy this book
    – Fabby
    Jan 27, 2015 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.