Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
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.
Hi all,
I'm running a sparc 100 with Sun Solaris version 9. I also have apache and ssh running in the background. I would like to know how to deny all the access to my server from all DNS except for a couples ip which I want to give access to. I have created 2 files
"hosts.deny (ALL: ALL)" AND "hosts.allow (All: LOCAL 10.0.0.0/255.255.255.0) "
But It doesn't block any ip coming from apache or ssh at all. what do I need to configure for this works ?
The hosts.allow, hosts.deny method work only for the services that run through inetd (using tcp wrappers). So either you use inetd to start the 2 services, or use iptables to control the access to them. For apache you can also use .htaccess to control who can access it.
Apache and SSH can be compiled to be tcpwrapper aware (and are typically compiled that way, at least on other platforms...). I've never tried to implement tcpwrappers on Solaris.
Do you use openssh? The config file may be in a different location than /etc/ssh/sshd_config if you use a commercial version of ssh. Ssh might be compiled with tcp-wrappers so you can use the config file to control access.
Look at the AllowUsers entry. It will deny all other users.
Also read the allow.hosts manpage. You said that you only want to allow access from two hosts to apache and ssh, but your config allows all hosts on the 10/8 network access to all services. I think that access control would be better controlled in the apache configuration as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.