LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-13-2005, 08:56 AM   #1
KiLLaWaBBiT
Member
 
Registered: Mar 2003
Location: UK
Distribution: Slackware 10.2, Kernel 2.6.13
Posts: 69

Rep: Reputation: 15
Pleaaaaaase help! Closing ports in slackware 10.1


Having trouble closing ports in slackware, below is nmaps output.


Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-07-13 14:52 GMT
Interesting ports on *My Server*:
(The 1649 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
111/tcp open rpcbind
139/tcp open netbios-ssn
445/tcp open microsoft-ds
587/tcp open submission
631/tcp open ipp
660/tcp open mac-srvr-admin
672/tcp open unknown
678/tcp open unknown
3306/tcp open mysql
6000/tcp open X11

Apart from 22,80,111, i want all the other ports closed. Any help would be *GREATLY*appreciated.
 
Old 07-13-2005, 09:41 AM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
There is no need to add a "pleeeeeeeaaaaase Help" in your subject, it won't help.

Slackware behavior is to open everything you have installed (dumb behavior I know). You have to turn off services by yourself.

First, take a look at /etc/inetd.conf . Comment every services you don't need (this probably mean everything).
Then take a look at /etc/rc.d/inet1 (or is it 2? I don't remember and I'm not on a slackware box right now). Again, comment every services that start that you don't want.
There is probably some more services started by other scripts in /etc/rc.d/, you might want to browse around and comment what you don't need.

Then, writing a firewall (read : iptables) script to make sure everything is tightly closed would probably be a good idea.
 
Old 07-13-2005, 06:08 PM   #3
Krugger
Member
 
Registered: Oct 2004
Posts: 229

Rep: Reputation: 30
Also do

which startx
edit the file and add -nolisten tcp to remove the port 6000 on the serverargs

the go to /etc/rc.d and chmod 600 every server you don't want to run.
 
Old 07-14-2005, 02:39 PM   #4
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Re: Pleaaaaaase help! Closing ports in slackware 10.1

Quote:
Originally posted by KiLLaWaBBiT
Having trouble closing ports in slackware, below is nmaps output.


Starting nmap 3.75 ( http://www.insecure.org/nmap/ ) at 2005-07-13 14:52 GMT
Interesting ports on *My Server*:
(The 1649 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
111/tcp open rpcbind
139/tcp open netbios-ssn
445/tcp open microsoft-ds
587/tcp open submission
631/tcp open ipp
660/tcp open mac-srvr-admin
672/tcp open unknown
678/tcp open unknown
3306/tcp open mysql
6000/tcp open X11

Apart from 22,80,111, i want all the other ports closed. Any help would be *GREATLY*appreciated.
cd /etc/rc.d
chmod 644 rc.sendmail rc.samba rc.mysql

These are tho ones I now will shutdown some of those ports(25, 139, 445, 3306) the others i'm not sure. You could read what each rc.<script> does by viewing them: more /etc/rc.d/rc.<scriptname>.

Changing these service start scripts to be non executable will stop them from starting.
 
  


Reply



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
Closing ports taggy Linux - Security 2 08-20-2005 01:03 PM
Closing these ports... greygoose80 Slackware 2 12-19-2004 11:12 PM
Closing Some Ports wonderpun Linux - Security 8 08-17-2003 03:09 PM
closing ports Tigger Linux - Newbie 15 06-11-2003 02:23 PM
Slackware n()()b and closing open ports/services osx Slackware 8 03-10-2003 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:35 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