Dark Ninja
09-26-2001, 07:25 PM
I recently noticed that I had a few ports on my system that were open, which I really don't want to have open.
How would I go about closing these ports? Is there a file I have to edit, or is there something more encompassing that I have to do?
Dark Ninja
element-x
09-26-2001, 11:26 PM
Since your subject refers to RPC, I assume you're talking about portmap,rpc.statd,rpc.mountd,rpc.nfsd and so on.
I'm not quite sure if any of these would be run out of inetd on your system, if they are, comment them out and send a SIGHUP to the inetd daemon.
If your system uses SysVinit, remove the S##<service> files(not a good idea incase you need them again later sometime) or rename them to K##<service>, from the runlevel your system uses on bootup. (I believe Debian uses runlevel 2, /etc/rc2.d, at startup) Other distributions may use other runlevels, to double check run:
$ grep initdefault /etc/inittab
If your system uses BSD init, find the area in the rc scripts where it executes/runs these services and comment them out. (If running slackware, comment out portmap and automounting of nfs shares in /etc/rc.d/rc.inet2) and chmod -x rc.nfsd
This should solve your problem. Also kill the existing processes for the rpc services, and you should be fine.
[ 26 September 2001: Message edited by: JAdrock ]
Dark Ninja
09-27-2001, 12:00 AM
Hmmmm...didn't find anything in inetd - and didn't see much else around either, to tell you the truth. (Looking for everything you said.) Basically, what I am going off of, is ports that are open after I ran an nmap scan across my computer system.
I do have one thing I'm going to try that I forgot about...but, if anybody has any other suggestions, I'd appreciate them.
Dark Ninja