Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
After many years working in a Windows environment I have been moved into a different position at my job working on Unix/Linux systems. We had a c omplaint of hack attempts via ssh to some servers recently. I confirmed the IPS in the log files and compared to what was listed in hosts.deny.
Hosts.deny is setup to deny ssh sessions from all IPs except for a select few. Hosts.allow is empty. Can someone tell me why these rogue IP's are allowed connectivity if they are not on the allow list?? Any help would be much appreciated. Thanks.
I suggest not relying on one line of defense. Since this is really about SSH attempts best read the solutions listed in the Linux Security sticky thread "Failed SSH login attempts" and pick a solution appropriate for your situation.
Here's an excerpt from that may shed a light on what's happening:
Originally Posted by ^H^H^H from man 5 hosts_access
. Access will be granted when a (daemon,client) pair matches an
entry in the /etc/hosts.allow file.
. Otherwise, access will be denied when a (daemon,client) pair
matches an entry in the /etc/hosts.deny file.
. Otherwise, access will be granted.
Basically you will want to drop everything from hosts.deny (ALL: ALL) and set up exceptions in hosts.allow.
You can see the 2nd line of my ldd output lists "libwrap.so.0", so mine is compiled with the required tcp_wrappers support. Most distros are compiled with this support in sshd, but it wouldn't hurt to check - just to make sure. Without such compiled in support, sshd will ignore your hosts.allow or hosts.deny files.
When you installed TCP wrappers, you should have kept the tcpd.h and libwrap.a files. Usually tcpd.h goes in /usr/local/include and libwrap.a goes in /usr/local/lib. By default, installing TCP wrappers doesn't install these two files, so you may need to grab the TCP wrappers source and recompile it, then install those two files.
This info came from this site (chapter 5.9): ssh faq 5