Operating System - HP-UX
1829592 Members
2795 Online
109992 Solutions
New Discussion

How to disable UDP port 19 and port 7

 
ITSD-ACCS
Frequent Advisor

How to disable UDP port 19 and port 7

a) How do I know if the machine is using UDP port 7 and 19.

b) How do I know if this two ports can be disabled ?

c) If this two port is not used currently, how do I disable these two ports
3 REPLIES 3
Robert Binkhorst
Trusted Contributor

Re: How to disable UDP port 19 and port 7

Hi,

Services are listed in /etc/services, so you can them there.
- port 7 is for echo
- port 19 is for chargen

Check if they're up by running netstat -a | grep echo and netstat -a | grep chargen

These two services are server by the inetd program, config file here: /etc/inetd.conf.
Just hash these services out (# at the beginning of the line) and restart inetd (ps -ef | grep inetd and then kill -HUP ).

HTH,

Robert
linux: the choice of a GNU generation
Naveej.K.A
Honored Contributor

Re: How to disable UDP port 19 and port 7

/etc/services is the file which associates official services and aliases with the port number and protocol the services uses.

netstat command will give you the information regarding the open ports and who is using it...


if you want to disable this just put a hash infront of the line starting for udp port number 19 and 7 in /etc/services.

with best wishes.
practice makes a man perfect!!!
hein coulier
Frequent Advisor

Re: How to disable UDP port 19 and port 7

/etc/services is only used to translate servicenames to port numbers (getservbyname()). Deleting an entry doesn't mean disabling a service.

If you want to be sure you want to disable a port, you must check all running deamons (netstat), or check /etc/inetd.conf.

If you want to be relly sure, you must disable the port in /var/adm/inetd.sec, or use tcp_wrapper.