closing ports
Hi
i am running a mail and web server using red hat 8 server. I ran languard on my system and it is showing i have ports 161 (snmp) and 520 (RIP) and 389 (LDAP) open. How can i close these ports once and for all? I thought by stopping the services this would stop them but it has not. Hopefully these ports will not be needed by my mail and web server. Also, it shows i have port 1900 (simple service discovery protocol) open as well. Is this one necessary? thanks |
You can safely close all 4 ports by closing the apps that open them. What do you mean when you say that you turned them off and they're still up? Have you rebooted after you closed them?
The command to show open ports is 'netstat -l'. Run it, then close the services and 'netstat -l' again. Is it better? And, last questions, how do you close them? |
//moderator note: Tigger already asked this very same question in /Security and it was answered to in multiple ways. See here.
Tigger: just so we know how to help you better, what is it you don't understand you need to ask the same question twice? |
Tigger, could you explain what was unclear in the previous thread? What is the situation now?
|
i do not understand /etc/rc.d/rc(runlevel).d or xinetd.
Do they mean edit these? If so, how do i know the runlevel? thanks |
Tigger, please understand there are NO stupid questions at LQ.
The only thing that's really stupid is NOT asking, OK? To get the runlevel type "/sbin/runlevel" in the console. The second character it shows is the runlevel you're in. For instance, if it says "3" that means the init script links are in /etc/rc.d/rc3.d . If you do not want to maintain those links manually (is not hard tho), use ntsysv, tksysv, chkconfig or whatever Red Hat system applet does the trick. |
thankyou unSpawn. These groups are great!!!
Yes, sometimes i feel very very stupid. I will try this today and let you know how i go |
help, i cannot edit these files because they are read only. The file i am trying to edit is rc5.d. How can i change the permissions please?
thanks again |
try opening a console, then typing su, enter your
root pass. then you can use nano, pico, or the text editor of your choice to edit the files. |
help, i cannot edit these files because they are read only. The file i am trying to edit is rc5.d.
rc5.d is a directory (/etc/rc.d/rc5.d), and is not to be edited. Look inside the directory: "ls -al /etc/rc.d/rc5.d". If you're going to edit system files, make sure you're root. Also if you're going to edit files manually, make sure you back them up. Also in /etc/rc.d/rc5.d are no files, but symbolic links. The actual files reside in /etc/rc.d/init.d, the links in /etc/rc.d/rc5.d change the start/stop behaviour and the place in the startup sequence a service is started/stopped as. Read for instance "man chkconfig" for details. |
thanks unspawn, i have got a lot of learning to do LOL
|
hey, everyone, i am more confused than before!!!!! I tried to edit these files but do not know what to do in the files. Do i put a # in front of the service in init.d or do i just delete the lines?
thanks again |
i still need help please? Anyone?
thanks |
Don't edit the files. What you need to do is turn off unneded services. First look at the list:
chkconfig --list It will show a table. Numbers mean runlevels (3 is console mode with network, 5 X-Window <- the most popular one). To turn a service off/on use something like this: chkconfig --level 3 nfs off it turns off service nfs on level 3. |
thanks mara but i have done this and when i run languard from across the internet it says that the ports are still open.
I do not understand. Are they open or not? thanks |
All times are GMT -5. The time now is 03:32 AM. |