HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Ports of /etc/services of hpux-11.23

 
SOLVED
Go to solution
ASIFKHAN
Frequent Advisor

Ports of /etc/services of hpux-11.23

Hi All,

We have HPUX11.23 over one of the server and we need to close the following ports in /etc/services :
Exec 512/tcp
Ident 113/tcp
Daytime 13/tcp
Echo 7/tcp
Discard 9/tcp
Swat 901/tcp
Ntalk 518/tcp


but i don't have the knowledge that what is the role of these ports in hpux-11.23 and what would be the effect if go ahead and close this ports as per the requirement.
If anyone has the answer then please help me out.

Regards
MAK
7 REPLIES
Michal Kapalka (mikap)
Honored Contributor

Re: Ports of /etc/services of hpux-11.23

hi,

most of this ports can be blocked on network level ( network infrastucture ) but you should know if some ports are not required for some runnig services on your server.

mikap

PS : ask the network admins if some traffice on this ports is presented.
Suraj K Sankari
Honored Contributor

Re: Ports of /etc/services of hpux-11.23

Hi,

See the port details in the below link
http://www.iana.org/assignments/port-numbers

Suraj
Hakki Aydin Ucar
Honored Contributor

Re: Ports of /etc/services of hpux-11.23

it seems most of them can be in use in your system, you have to careful if you want them keep closed /etc/services ; you can use:

man to know about them.

but it is better to block them in network layer like in firewall or router something not inside the unix machine. .
Laurent Menase
Honored Contributor

Re: Ports of /etc/services of hpux-11.23

you just need to comment them in /etc/inetd.conf then restart with inetd -c

exec -> is used for rexec
ident -> is used by MC/SG and sendmail
it may be a problem to disable it
it permit to identify from a 4ulp (ips/ports) who is the owner of the connection.

Daytime as its name
echo echo received messages
discard just discard received messages
the 2 previous are usually usefull for tests and troubleshooting, but not mandatory

ntalk no pb to disable
swat is for Samba Web Administration Tool so should not be a problem to disable it

ASIFKHAN
Frequent Advisor

Re: Ports of /etc/services of hpux-11.23

Hi Laurent,

Then please tell me why not to process over these ports in /etc/services .

As far as i know inetd.conf file will enable and disable internet daemons.

Regards
MAk
Steven E. Protter
Exalted Contributor

Re: Ports of /etc/services of hpux-11.23

Shalom,

These ports can be safely closed.

/etc/sevices is really a reservations file.

Some of the services in there can continue to function without the entry. Disabling swat is likely to take down the swat samba configuration service.

netstat -an | grep ##

See if there are services listening on those ports, and take those daemons down to complete the job.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Laurent Menase
Honored Contributor
Solution

Re: Ports of /etc/services of hpux-11.23

/etc/services is only to give a name to a port.
there is no reservation done at all, only naming.

Then those ports/name are used by daemons doing
getservbyname()
all the port you mentionned in the list are managed by inetd whih in this case is the daemon, which for each of its inetd.conf line will do a getservbyname() to get the port number on which it must listen for each service.
If you comment in /etc/services, inetd will not listen on the port because it will not find the port by its name, giving an error in syslog
But the best way to disable those services is to comment them in inetd.conf, then restart inetd with inetd -c .

Then the ports will be closed.