Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.