1753297 Members
6744 Online
108792 Solutions
New Discussion

open tcp port

 
shikhar_1
Regular Advisor

open tcp port

Hi,

 

Can anyone please let me know the procedure for the below requirement?

 

open tcp port 383 bi-diractionally from node to management server.

 

Please arrange to open the port bi-directonally from the server "lfcdbp02.rar.ncsus.jnj.com" to Management servers "itsnaovp", "itsnaovq" and hpx234.

 

[root@lfcdbp02:/.root]#
#-> grep 383 /etc/services
ovbbccb      383/tcp    # OV Communication Broker


 

telnet lfcdbp02.rar.ncsus.jnj.com 383

Trying...

telnet: Unable to connect to remote host: Connection refused

[root@lfcdbp02:/.root]#

 

#-> netstat -an | grep 383 | grep LISTEN
[root@lfcdbp02:/.root]#

 


 

On management Servers:

====================

 

#-> telnet itsnaovq 383
Trying...
Connected to itsnaovq.jnj.com.
Escape character is '^]'.

onnection closed by foreign host.
[root@itsnaovq:/.root]#

 

#-> netstat -an | grep 383 | grep LISTEN
tcp        0      0  *.383                  *.*                     LISTEN
[root@itsnaovq:/.root]#

 

#-> grep 383 /etc/services
ovbbccb      383/tcp    # OV Communication Broker
[root@itsnaovq:/.root]#

 

Appreciate the response.


 

 

2 REPLIES 2
akio_kabutogi
Advisor

Re: open tcp port

To get LISTEN entry showing up in netstat -an command, adding an entry in

/etc/services is not enough. You have to start the application program that

uses the specified port number.  An entry in /etc/services is just a

prerequisite so that the application can start setting up LISTEN entry.

basant
Frequent Advisor

Re: open tcp port

 

uncomment the required ports in /etc/services & /etc/inetd.conf 

 

if entry of port not exists  in above files ,make entry of required port in above files.

 

make inetd deamon restart the inetd.conf file by using

# inetd-c

 

If any service associated to required port is not runing in your HPUX server

If you want to test if it is possible to open those ports you can try the following way :

1. Add a new entry in /etc/services like this :

testservice 60001/tcp

2. Create a simple script /tmp/testservice.sh

#! /sbin/sh
echo TEST SERVICE
echo TEST SERVICE
echo TEST SERVICE
exit 0

chmod 700 /tmp/testservice.sh

3. Add the following entry in /etc/inetd.conf

testservice stream tcp nowait root /tmp/testservice.sh TEST

4. Inetd -c
5. telnet <server> 60001

You will see ::

telnet isabelle 60001

Trying...
Connected to isabelle.it.pirelli.com.
Escape character is '^]'.
TEST SERVICE
TEST SERVICE
TEST SERVICE
Connection closed by foreign host.

This is the way that I use to test if it is possible open a tcp port, I don't know if it is your need.

 

 

 

Basant Sharma