LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-08-2003, 10:55 AM   #1
osx
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware 9.0/Red Hat 9.0
Posts: 22

Rep: Reputation: 15
Slackware n()()b and closing open ports/services


Hi everyone

Just installed Slackware 8.1 and being from a Red Hat background am having trouble in closing a lot of open ports !!

PS - I read somewhere on here that SLackware is secure out-of-the-box ... well unless I've set something up incorrectly then it really is VERY insecure

A few ports that are open:
21
22
23
25
80
111
113

and a dozen more !!

My question is this:

I believe the confiugration of which services run/are loaded is done in /etc/rc.d/ but how do you CORRECTLY disable or add a service?

I want to run Apache and am happy with that but don't require
FTP
Telnet
SMTP etc ...

Any help would be greatly appreciated

PS - has anyone had much joy with the Linux drivers for NVidia GPU's?

My X-Windows works fine ATM after a lot of tweaking but may upgrade in the future

Thanks



OSX
 
Old 03-08-2003, 10:59 AM   #2
loke137
Member
 
Registered: Feb 2003
Location: Brasil
Distribution: Debian Etch
Posts: 147

Rep: Reputation: 15
22 is telnet, 23 is ssh ( or the other way arround), 80 http (I think you like browsing dont you? eheh). You could set up a iptable script to close the open ports.
I have never done it, but I would point you to any place on google/linux to find a proper script.
 
Old 03-08-2003, 11:31 AM   #3
osx
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware 9.0/Red Hat 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks for the reply

The thing is I don't want to just block them ... I want to close them.

I don't want them running at all and wasting CPU Cycles and RAM

I've already checked Google but can't really find much slackware documentation which is a little dissapoiting as I was under the impression that it was the choice of "More experienced users"

I chose Slackware because I was fed up of the RPM's in Red Hat.

I wanted really to compile and build packages myself.

Maybe I'll have to consider http://www.gentoo.org or one of the BSD's

Cheers

David
 
Old 03-08-2003, 11:35 AM   #4
figadiablo
Member
 
Registered: Feb 2002
Location: Virginia USA
Distribution: Slackware, CentOS, Fedora
Posts: 342

Rep: Reputation: 30
I believe that comenting out, or adding a "#" at the beggining of the corresponding line of these ports in the /etc/services files will do the trick of closing these ports for you.

Cheers,
Figa
 
Old 03-08-2003, 11:53 AM   #5
loke137
Member
 
Registered: Feb 2003
Location: Brasil
Distribution: Debian Etch
Posts: 147

Rep: Reputation: 15
Quote:
Originally posted by figadiablo
I believe that comenting out, or adding a "#" at the beggining of the corresponding line of these ports in the /etc/services files will do the trick of closing these ports for you.

Cheers,
Figa
it ensures the process doesnt start, but does it also secure the port? isnt that the point of making a iptable script?
 
Old 03-08-2003, 12:48 PM   #6
osx
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware 9.0/Red Hat 9.0
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
I believe that comenting out, or adding a "#" at the beggining of the corresponding line of these ports in the /etc/services files will do the trick of closing these ports for you.
Thanks I'll try it when I get home later

Does that mean the process isn't loading then at boot???

Quote:
it ensures the process doesnt start, but does it also secure the port? isnt that the point of making an iptable script?
The port is secure if no process/daemon is listening !

If the process isn't running then no exploit exists because the port is closed

Closing a port is much more secure than controlling access to a port which is what a firewall does

OSX

 
Old 03-08-2003, 07:30 PM   #7
figadiablo
Member
 
Registered: Feb 2002
Location: Virginia USA
Distribution: Slackware, CentOS, Fedora
Posts: 342

Rep: Reputation: 30
Quote:
The port is secure if no process/daemon is listening !

If the process isn't running then no exploit exists because the port is closed

Closing a port is much more secure than controlling access to a port which is what a firewall does

OSX
Yup, I have to agree with you OSX. Hopefully I was able to help you out with your question.


Paz,
Figa
 
Old 03-09-2003, 12:00 AM   #8
cryptomundo
LQ Newbie
 
Registered: Mar 2003
Posts: 5

Rep: Reputation: 0
/etc/inetd.conf
 
Old 03-10-2003, 01:51 PM   #9
otbibb
Member
 
Registered: Oct 2002
Distribution: Slackware 8.1
Posts: 33

Rep: Reputation: 15
In your /etc/rc.d/rc.M script, you'll see that it calls rc.inet1 adn rc.inet2. In these two scripts you will find all kinds of net-related processes and such. On my laptop which doesn't serve anything, I have the rc.inet2 commented out in rc.M. Also, I make sure that the inetd super-daemon is not run, which can be a vulnerability. Then, if I need some of those services, I can manually run /etc/rc.d/rc.inet2 start.

This would be in addition to blocking ports in your services file and including an iptables script for extra protection. It depends on how vigorous you want to be. I try to lock down everything except ssh on my office computer. I can pretty much accomplish whatever I need through that port if I'm away.

hth,
BB
 
  


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
Pleaaaaaase help! Closing ports in slackware 10.1 KiLLaWaBBiT Linux - Security 3 07-14-2005 03:39 PM
slackware default open ports perfect_circle Slackware 16 03-01-2005 11:02 AM
Closing ports/stopping services New2MDK Linux - General 5 02-15-2005 01:24 PM
Nmapfe, open ports, and running services jrdioko Linux - Security 20 09-04-2004 04:25 PM
Open Ports - Do they need closing? Tezdread Linux - Security 12 07-11-2003 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:54 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
Open Source Consulting | Domain Registration