This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article.
Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
Enabling TCP Wrappers in the Solaris 10 Operating System
Glenn Brunette, April, 2005
First let's first provide a little background. TCP
Wrappers has been around for many, many years (see Wietse Venema's FTP archive). It is used to restrict access to TCP services based on host name, IP address, network address, and so on. For more details on what TCP Wrappers is and how you can use it, see tcpd(1M). TCP Wrappers was integrated into the Solaris Operating System starting in the Solaris 9 release, where both Solaris Secure Shell and inetd-based (streams, nowait) services were wrapped. Bonus points are awarded to anyone who knows why UDP services are not wrapped by default.
TCP Wrappers support in Secure Shell was always enabled since Secure Shell always called the TCP Wrapper function
host_access(3) to determine if a connection attempt should proceed. If TCP Wrappers was not configured on that
system, access, by default, would be granted. Otherwise, the rules as defined in the hosts.allow and hosts.deny
files would apply. For more information on these files, see hosts_access(4). Note that this and all of the TCP Wrappers
manual pages are stored under /usr/sfw/man in the Solaris 10 OS. To view this manual page, you can use the following command:
$ man -M /usr/sfw/man -s 4 hosts_access
inetd-based services use TCP Wrappers in a different way. In the Solaris 9 OS, to enable TCP Wrappers for inetd-based services,
you must edit the /etc/default/inetd file and set the ENABLE_TCPWRAPPERS parameter to YES. By default,
TCP Wrappers was not enabled for inetd.
In the Solaris 10 OS, two new services were wrapped: sendmail and rpcbind. sendmail works in a way similar
to Secure Shell. It always calls the host_access function and therefore TCP Wrappers support is always enabled.
Nothing else needs to be done to enable TCP Wrappers support for that service. On the other hand, TCP Wrappers support for
rpcbind must be enabled manually using the new Service Management Facility (SMF). Similarly, inetd was
modified to use a SMF property to control whether TCP Wrappers is enabled for inetd-based services.
Let's look at how to enable TCP Wrappers for inetd and rpcbind.
To enable TCP Wrappers support for inetd-based services, you can simply use the following commands:
Whether you use inetadm(1M) or svccfg is really a matter of preference. Note that
you can also use inetadm or svccfg to enable TCP Wrappers on a per-service basis. For
example, let's say that we wanted to enable TCP Wrappers for telnet but not for ftp. By
default, both the global and per-service settings for TCP Wrappers are disabled:
That is all there is to it! Quick, easy and painless!
The information and links on this page have been provided by a BigAdmin
user. The submitter is solely responsible for such information and
links. Sun is not responsible for the availability of external sites or
resources, and does not endorse and is not responsible or liable for any
content, advertising, products, or other materials on or available from
such sites or resources. Sun will not be responsible or liable, directly
or indirectly, for any actual or alleged damage or loss caused by or in
connection with use of or reliance on the information posted here, or
goods or services available on or through any external site or
resource.
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.