1752340 Members
5659 Online
108787 Solutions
New Discussion юеВ

Opening port in HPUX

 
Sac77
Advisor

Opening port in HPUX

Hi Guys,

I am trying to open the port in hpux.

I've enterd the port in /etc/services but still reciving the below error

telnet localhost 21000
Trying...
telnet: Unable to connect to remote host: Connection refused

please help thanks!
19 REPLIES 19
Johnson Punniyalingam
Honored Contributor

Re: Opening port in HPUX

Hi Sac,

can please help to post the entry to put under the /etc/services ..?

after edting did you issue

# inetd -c (to reinitilze) try if helps.

# telnet 21000

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Sac77
Advisor

Re: Opening port in HPUX

Here you go,

host > egrep '28000|29000' /etc/services
28000 28000/tcp
29000 29000/tcp

I've already tried to inetd -c but dosent work.
Sac77
Advisor

Re: Opening port in HPUX

Sorry grep the wrong port -

host > grep 21000 /etc/services
21000 21000/tcp
Johnson Punniyalingam
Honored Contributor

Re: Opening port in HPUX

>>host > egrep '28000|29000' /etc/services
28000 28000/tcp
29000 29000/tcp
<<

# telnet 28000
# netstat -an|grep 28000 or 29000

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Sac77
Advisor

Re: Opening port in HPUX

Hi Johnson,

my 28000 is working fine...
but not 21000 would you please advise.

Also I need to stop this port from listing state. can advise me for the same. thanks!

> netstat -an | grep 28000
tcp 0 0 *.28000 *.* LISTEN
Steven Schweda
Honored Contributor

Re: Opening port in HPUX

> I am trying to open the port in hpux.

What does this mean, exactly?

> I've enterd the port in /etc/services [...]

And what did you expect this to do, exactly?

/etc/services provides a mapping between port
numbers and service names. It does not cause
any program to be run. (And it can't stop
most programs from running, either.)

man services

> [...] Connection refused

This normally means that there's no program
which is running (or registered as ready to
run) which is listening (or willing to
listen) to that port.

> # inetd -c [...]

This causes inetd to re-read _its_
configuration file (which is _not_
/etc/services). If you put something into
_that_, it might make a difference.

man inetd
man inetd.conf
Steven Schweda
Honored Contributor

Re: Opening port in HPUX

> Also I need to stop this port from listing
> state. [...]

So, take something out of inetd.conf (or stop
the listening program, if it isn't started by
inetd).

Give /etc/services a (well deserved) rest.
Johnson Punniyalingam
Honored Contributor

Re: Opening port in HPUX

my 28000 is working fine...
but not 21000 would you please advise.

how is your entry.? Does it look like below


Example:-
serive name port comment
omni 5555/tcp # DATA PROCTECTOR

>>>Also I need to stop this port from listing state. can advise me for the same. thanks!>
netstat -an | grep 28000
tcp 0 0 *.28000 *.* LISTEN<<<<


You can comment from /etc/service "port 28000" & inetd -c


Thanks,
JOhnson
Problems are common to all, but attitude makes the difference
Steven Schweda
Honored Contributor

Re: Opening port in HPUX

> You can comment from /etc/service "port
> 28000" & inetd -c

Yes, you can, but don't be amazed if it MAKES
NO DIFFERENCE.


PLEASE, GIVE /etc/services A (well deserved) REST.