• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to get a list of open ports in Linux?

    So you have set up a very secured server but still don't you want to cross check if the machine is really secured and your server has not been compromised by anyone. If is always better to regularly scan your system with open ports and list of connected machines.

    For this blog I will show you the command to get a list of open ports in any machine

    nmap command can be used to do the same. You can download in RedHat machine using yum
    # yum install nmap
    Once installed verify the package
    # rpm -qa | grep nmap

    # nmap <address>

    # nmap localhost
    Starting Nmap 5.51 ( http://nmap.org ) at 2013-09-18 12:04 IST
    Nmap scan report for localhost (
    Host is up (0.0000080s latency).
    Other addresses for localhost (not scanned):
    Not shown: 995 closed ports
    22/tcp open ssh
    25/tcp open smtp
    111/tcp open rpcbind
    631/tcp open ipp
    5989/tcp open wbem-https
    Nmap done: 1 IP address (1 host up) scanned in 0.29 seconds

    Here as you can see I got a long list of opened ports on my machine.
    Go ahead and try the same on your machine.

    Related Articles
    What are the s and k scripts in the etc rcx.d directories
    How to check all the currently running services in Linux
    How to auto start service after reboot in Linux

    Follow the below links for more tutorials:

    Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    How to configure Samba 4 Secondary Domain Controller
    How to secure Apache web server in Linux using password (.htaccess)
    How to register Red Hat Linux with RHN (Red Hat Network )
    Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
    15 tips to enhance security of your Linux machine
    Why is Linux more secure than windows and any other OS
    What is the difference between "su" and "su -" in Linux?
    What is kernel-PAE in Linux?
    What is swappiness and how do we change its value?
    How to log iptables messages in different log file
    What is virtual memory, paging and swap space?
    Iptables rules to allow/block ssh incoming/outgoing connection in Linux
    Iptables rules to block/allow icmp ping request in Linux

    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?

    Become an author and be a part of our GoLinuxHub Team, Click here for more information
    How to get a list of open ports in Linux? How to get a list of open ports in Linux? Reviewed by Deepak Prasad on Friday, May 03, 2013 Rating: 5

    No comments:

    Powered by Blogger.