1836611 Members
3907 Online
110102 Solutions
New Discussion

Port Number

 
Javier Ortiz Guajardo
Frequent Advisor

Port Number

i have a product that uses the port 4034 and it have problems because it tells the port is unexpectly closed.

the port is 4034, and i can??t find it en /etc/services. Jus i can see it whit netstat -a and show this
tcp 0 0 *.4034 *.* LISTEN
tcp 0 0 mvi913.4034 mvi913.54243 ESTABLISHED
tcp 0 0 mvi913.54243 mvi913.4034 ESTABLISHED

how can i kwon, where is this port configured?, and How can i identify the ESTABLISHED conection (mvi913.54253)? How can i evaluate this port?

Please any help to understand how the ports work , i appreciate so much.
The obstacles are those things that the people see when they left to see their goals.
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Port Number

If it's not in /etc/services, I would think it was not only unexpectedly close, but probably never opened! Has this ever worked? Does it start to work and then fail?

Try putting it in /etc/services.


Pete

Pete
John Dvorchak
Honored Contributor

Re: Port Number

I would use:
lsof -i tcp:4034

If you have lsof installed. If not then you should consider getting lsof. It's great, it's free be the first on your block with lsof:

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/

Or you can do a google search on lsof hpux and see if there are other places.
If it has wheels or a skirt, you can't afford it.
Michael Steele_2
Honored Contributor

Re: Port Number

As the incorigible Mr. Dvorchak has indicated lsof -i tcp:4034 is best for evaluating a port. Ports are simply open files and lsof is the "list open files" command.
Support Fatherhood - Stop Family Law
U.SivaKumar_2
Honored Contributor

Re: Port Number

Hi,

It is possible for any network process to listen on a port even without putting any entries in /etc/services.

Listing in /etc/services only provides a service name mapping for that particular port.

So In your case since you have not put any service name entry about port 4034 , When you issue netstat -a , it will show the numeric port number.

But if you notice the other entries in netstat -a output you will find some service names instead of port numbers . Those service names are mapped to port numbers in /etc/services.

So for identifying the listening port against service name in netstat type of commands and /etc/inetd.conf file we use /etc/services.

/etc/services has no effect on the network process and its listen() capability.

regards,

U.SivaKumar
Innovations are made when conventions are broken
Dave Unverhau_1
Honored Contributor

Re: Port Number

Probing remote systems for open ports is one way that hackers seek access to potential victim computers.

Maybe you have installed some software that's looking for such ports, doesn't recognize it as a valid port and closes it?

Regards,

Dave
Romans 8:28