Solved

how do I close the port 37 ?

Posted on 2006-10-20
5
1,376 Views
Last Modified: 2013-12-05
Hi.
My linux (slackware)  is listening on TCP/UDP port 37. How can I stop this time service.
Is there some security problem or something depends on it?
Sorry my english.
0
Comment
Question by:edgardvieira
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:Chatable
ID: 17777268
I found this website: http://www.auditmypc.com/port/udp-port-37.asp
This website states that port 37 is used for:
"Time. Provides remote timing stat's of internal processing events. Security Concerns: Gives remote attacker info on host's internal processing load. Can identify critical processing times, plus output can be looped to echo port (7) and create a DOS threat to the subnet. Disable this port on all hosts."
Well I don't agree that this is a major security concern however it still might be a good idea to close it.

Okay since I don't have slackware I will relate to the general task of closing an unneeded open port.
First you determine which application is bound to this port. Run this: netstat --inet -anp
This will dump a list of all open ports along with the PID of their associated process. Then, once you have the PID you can determine which program it is by running: ps -ef
Once you've found the program simply stop it and remove it from your /etc/rc#.d folder so it doesn't execute on startup.
An alternative approach is to simply use the linux built-in firewall (iptables) to block access to unneccessary ports.
You may check this page for an iptables guide: http://iptables-tutorial.frozentux.net/iptables-tutorial.html
0
 
LVL 35

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 17778170
I find lsof easier to use than netstat:

10:36:02# lsof -i :time
COMMAND PID USER   FD   TYPE DEVICE SIZE NODE NAME
inetd   566 root    4u  IPv4    654       TCP *:time (LISTEN)
inetd   566 root    5u  IPv4    655       UDP *:time

On my (Slackware) system, inetd is accepting time calls (along with a lot of other ports, but I asked lsof to only show the time port ("man lsof" for an explanation)).

If you don't want the time service to be enabled, edit /etc/inetd.conf, to comment-out these 2 lines:

time    stream  tcp     nowait  root    internal
time    dgram   udp     wait    root    internal

These lines correspond exactly to the 2 entries that lsof showed earlier
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 17778180
After changing /etc/inetd.conf, send SIGHUP to the inetd process to have them take effect:

killall -HUP inetd
0
 
LVL 7

Expert Comment

by:Chatable
ID: 17779624
omg you're right, I forgot to relate to inetd... killing inetd isn't a good idea.
if inetd is indeed the process that listens on port 37 you should definitely do what duncan_roe has suggested.
0
 

Author Comment

by:edgardvieira
ID: 17794827
Sorry my delay.
Thanks.
0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question