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.
You want to deny ssh action to everyone except 192.168.0.100, refused attempts get logged (which must a big log file make.)
Presumably you can figure out how to rig policy deny, and accept incoming ssh connections by IP?
This leaves adding a log entry... which is just the same as the accept incoming, except it jumps to a log instead.
I think it is important that you understand your firewall. It is also good discipline to describe what you hope to acheive in normal language instead of trying to duplicate the effect from another application.
Thanks for the wise advice but at least i should get a mail when some one tries to ssh me...Can i achieve this through iptables or is there any other method except tcp-wrappers,port sentry and tripwire?
... should appear after the -j ACCEPT entry for ssh from that one allowed IP. Since you have a default drop policy <raised eyebrow> you don't need an explicit DROP rule here.
[*]I don't do this myself, but I modified a rule to log portscans. http://www.newartisans.com/blog_file...h.iptables.php
... caveat: these guys don't seem to use default DROP policies. Sad sad sad... you will always forget something: -P DROP catches it.
To be clear about the other things: Port Sentry is deprecated and should not be used anymore. Use something like Snort or Prelude if you want IDS capabilities or else something "simple" like PSAD could do. tripwire is a filesystem integrity checker like Aide, Samhain, Osiris and such has nothing to do with checking ports. Wrt to SSH it would be good to harden your setup, read the sticky Failed SSH login attempts thread and implement one of the solutions. The idea to e-mail an alert on tripping a port is nice if your part of the 'net doesn't receive any port probing but it is not an efficient or scalable solution.
Thanks for the valuable suggestions.What i want was that i should get the alert through mail when the hacker attacks or even tries to attack my Server.So again in brief tell me how to prevent server from being hacked and get alerts.