Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shutting down unwanted daemons/services? 2

Status
Not open for further replies.

ag6969

Technical User
Jun 4, 2001
85
CA
Does anybody know how to turn off unneeded services. I am running one of my FreeBSD (4.2) boxes as a NAT server.I would like to find out which services/daemons and turn them off to conserve precious CPU cycles. I don't need ftp, telnet, etc. I was able to disable sendmail in /etc/rc.conf, but I don't know how to disable the other services (automatically when system boots). Or if anyone has any suggestions about which services should be shut down for minimal operation as a NAT server.( I am not performing any packet logging, just pure NAT, that's all this machine does.) Thanks.
 
FTP and telnet are connection oriented services. They are spawned by inetd.

edit the file /etc/inetd.conf



-Danny






 
FreeBSD has an interesting approach to system initialization: in "/etc/defaults/rc.conf", you will find the standard system startup options. However, you are not expected to make changes to that file (I mean, you can if you really want to... this is Unix ;-)).

Instead, to customize your startup options, the init system allows you to edit the file at "/etc/rc.conf", which only contains overrides to the startup options in "/etc/defaults/rc.conf". The point of this is, no matter how much you mess up your system startup options, even if you completely break the syntax of that file, the main startup options are still available.

So, spend some time browsing "/etc/defaults/rc.conf", then make your overrides in "/etc/rc.conf" in the style of:

firewall_enable="YES"
gateway_enable="YES"
moused_enable="NO"

Now, there is no reason to have an enabling option if it is already enabled in the default config file, thus sendmail_enable="YES" is pointless, but sendmail_enable="NO" will override the default, thus stopping sendmail. (And vice versa for options that are non-enabled in the default conf, but you want to override to enable).
 
You're welcome. Also, remember that you can have other simple startup options in "/etc/rc.local" that are not controlled by "/etc/defaults/rc.conf". "/etc/rc.local" mainly exists for you as the user to have a simple place to put some command-line startup scripts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top