2 Replies Latest reply: Feb 22, 2013 1:07 PM by 992835 RSS

    How to find whether port is open or not

    992431
      Dear Team,

      I have oracle databse on solaris machine with listerner port 1521 , i want to know how to check whether port is open from my client to server .
      there are certain limitations ,as i am working with secure network where ping is not allowed (disabled ) and i dont have admin right in my client so could not use telnet from client.
      i can nither enable telnet utility in my client .

      i am to install "Oracle SOA Suite Repository " ,so there is not oracle client .
        • 1. Re: How to find whether port is open or not
          Girish Sharma
          The command to check if a perticular port is listening on solaris is :

          netstat -an | grep $portnumber

          Example:

          Command:

          netstat -an | grep 7222
          Output:
          *.7222 *.* 0 0 49152 0 LISTEN

          Edited by: Girish Sharma on Feb 21, 2013 3:45 PM

          Or

          1.Open a terminal session.
          2.Type the command "netstat -an" to obtain a list of all the open ports.
          3.Type the command "netstat -an | grep 8080" to determine whether port "8080" is open. You can replace "8080" with any specific port that you are looking for.
          4.Type the command "exit" to close the terminal session.
          • 2. Re: How to find whether port is open or not
            992835
            You check check if the port is open from your client to server by running the following command from the client:

            If the client is unix/linux:
            from a terminal run the command:
            telnet server-ip port-no
            eg
            telnet 172.29.64.208 1521

            If the client is windows:
            From the command prompt or from windows terminal run the command:
            telnet server-ip port-no
            eg
            telnet 172.29.64.208 1521

            Closed port will result:
            WINDOWS:
            Connecting To sedefu01...Could not open connection to the host, on port 6789: Co
            nnect failed
            UNIX:
            -bash-3.2$ telnet 172.29.64.208 1521
            Trying 172.29.64.208...
            telnet: Unable to connect to remote host: Connection refused

            Open port will result:
            WINDOWS:
            The telnet will pass
            UNIX:
            -bash-3.2$ telnet 172.29.64.208 1521
            Trying 172.29.64.208...
            Connected to 172.29.64.208.