LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 07-10-2001, 09:30 PM   #1
zyan
LQ Newbie
 
Registered: Jun 2001
Location: U.P.
Distribution: Red Hat 7.0
Posts: 3

Rep: Reputation: 0
Question how to close open ports


hi friends!
i read somewhere that i can close my open ports by putting a '#' before the lines containing that port no. in the file inetd.conf
but since the latest varsions have started coming with the more secure xinetd.conf how can i customize it?
thanx in advance.
 
Old 07-10-2001, 09:54 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,716
Blog Entries: 54

Rep: Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967Reputation: 2967
aint it in the manual? I aint running xinetd, but ports are bound to a running service, so if im caught guessing its either adding it to the
"disabled = (servicenames)"
in the main part of the xinetd.conf or comment out the whole per-service part like
"# service (servicename) {
# args
# args
# args
# }"

btw upgrade to the latest version of xinetd, it has had some bugs.
 
Old 07-11-2001, 06:48 AM   #3
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Hi,

I agree first patch the xinetd for security fixes.

The easiest and quickest way to do this is to create a directory in the /etc/xinetd.d directory called disabled.

Then you should see the start up services scripts in /etc/xinetd.d like this
-rw-r--r-- 1 root root 297 Feb 27 17:17 chargen
-rw-r--r-- 1 root root 321 Feb 27 17:17 chargen-udp
-rw-r--r-- 1 root root 297 Feb 27 17:17 daytime
-rw-r--r-- 1 root root 321 Feb 27 17:17 daytime-udp
-rw-r--r-- 1 root root 289 Feb 27 17:17 echo
-rw-r--r-- 1 root root 312 Feb 27 17:17 echo-udp
-rw-r--r-- 1 root root 318 Feb 27 17:17 finger
-rw-r--r-- 1 root root 259 Feb 27 17:13 ntalk
-rw-r--r-- 1 root root 361 Feb 5 22:43 rexec
-rw-r--r-- 1 root root 378 Feb 5 22:43 rlogin
-rw-r--r-- 1 root root 431 Feb 5 22:43 rsh
-rw-r--r-- 1 root root 317 Sep 30 2000 rsync
-rw-r--r-- 1 root root 247 Feb 27 17:13 talk
-rw-r--r-- 1 root root 305 Jan 22 13:52 telnet
-rw-r--r-- 1 root root 321 Feb 27 17:17 time
-rw-r--r-- 1 root root 317 Feb 27 17:17 time-udp

Move each file service name to the new disabled directory "/etc/xinetd.d/disabled" that you don't want started.

Then type:
/etc/rc.d/init.d/xinetd stop
/etc/rc.d/init.d/xinetd start

To enable a service again simply move the file back and stop/start xinetd.

Raz
 
Old 08-04-2001, 09:11 PM   #4
s-k-a
LQ Newbie
 
Registered: Aug 2001
Posts: 1

Rep: Reputation: 0
Thumbs up

Didn't even think of the new disabled directory idea, been commenting eveything out of each folder sepratly...

Thanks..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I close open ports ??? apache Linux - Security 2 07-20-2004 08:44 PM
Which ports should I keep open and which close?? apache Linux - Security 3 07-19-2004 09:31 AM
how to close open ports mayagenesis Linux - Networking 1 07-31-2003 01:47 AM
How do i close my open ports??? Synth218 Slackware 10 07-06-2003 03:31 PM
open ports... how do i close them? prodigius Linux - Security 3 01-18-2002 09:35 AM


All times are GMT -5. The time now is 05:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration