Saturday, May 5, 2012

Turn off service on Solaris 10

I usually install Linux as minimal as I could. I don't like services running on my box that I will not use. It's just a security hole. However, in Solaris, if I use Core Support as my Software Distribution, it is minimal but there are lot of packages that I need and as you would know, it's a pain installing package in Solaris unlike RHEL and Ubuntu wherein there is yum and apt-get to take care of dependencies. So what I did is install Solaris Entire Distribution and just turn off those default service and boot the server with GUI turn off. I only want ssh as the only service running on my box. Below are the services that I turn off after it boots from the installation.
svcadm disable svc:/system/webconsole:console
svcadm disable svc:/application/management/wbem:default
svcadm disable svc:/network/rpc/bind:default
svcadm disable svc:/network/sendmail-client:default
svcadm disable svc:/network/smtp:sendmail
Below are the open ports before I turn off those services.
# netstat -an | grep -i listen
      *.111                *.*                0      0 49152      0 LISTEN
127.0.0.1.5987             *.*                0      0 49152      0 LISTEN
127.0.0.1.898              *.*                0      0 49152      0 LISTEN
127.0.0.1.32771            *.*                0      0 49152      0 LISTEN
127.0.0.1.5988             *.*                0      0 49152      0 LISTEN
127.0.0.1.32772            *.*                0      0 49152      0 LISTEN
      *.22                 *.*                0      0 49152      0 LISTEN
127.0.0.1.6788             *.*                0      0 49152      0 LISTEN
127.0.0.1.6789             *.*                0      0 49152      0 LISTEN
127.0.0.1.32780            *.*                0      0 49152      0 LISTEN
      *.22                              *.*                             0      0 49152      0 LISTEN
Here is now the output of netstat after turning off those services.
# netstat -an | grep -i listen
      *.22                 *.*                0      0 49152      0 LISTEN
      *.22                              *.*                             0      0 49152      0 LISTEN

No comments:

Post a Comment