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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable services in Solaris

Status
Not open for further replies.

lamsf

Technical User
Jul 27, 2003
103
US
Hi,
How do I disable services like ftp, telnet in a sun box, running on Solaris 8?

Also, how do I enable/disable certain ports?

Thanks...
 
Have a look at /etc/services and comment out any you don't want running.

I want to be good, is that not enough?
 
How do I disable services like ftp, telnet in a sun box, running on Solaris 8?

Edit the file /etc/inet/inet.conf and 'bounce' the inetd daemon (# pkill -HUP inetd).
Before you do that, read the contents of /etc/inet/inet.conf and see the man pages for 'inetd' and 'inetd.conf'.
Also note that it is very different in Solaris 10.


Also, how do I enable/disable certain ports?

I'm not sure if there is a command to do this. As Ken suggests, comment out ports in /etc/services that are not required.
Also see the man pages for 'netstat' , 'inet' and 'services'.


I hope that helps.

Mike
 
The /etc/services file is more like the hosts table. Having something in it doesn't necessarily make it active. It just assigns a name to a specific port number.

/etc/inetd.conf and the inetd daemon controls many (not all) services that you're looking for. Many secure servers have inetd disabled or all lines commented out of the /etc/services file. Obviously, you can select just ftp and/or telnet as first steps. Remember to "HUP" the inetd process to activate any changes.
 
Thanks for the clarification. Strange how we can carry a misinterpretation through the years isn't it!

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top