Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
After seeing these scans on my systems I began setting up IPTables to allow access to port 22 only to specific IPs. I allow only IP's on our Public subnet and now traffic from outside of the IPs that I have is immediatly droppedl It's as simple as that, and now I have no more of these scans.
If you have dynamic ip you can easily add an allow in iptables by mac address. My home system has a dynamic IP as well and it has been trivial to add access for this system to my ssh hosts.
The solution is simple and secure. In my case I don't need to allow access to unknown hosts for ssh, but that is as it should be. If I need to give a client access to ssh for some reason I add the IP that they will be connecting from. An important part of our security policy is to know who is connecting, allow those who need access and block everything else.
Not news???? Well, I don't have these login attempts any more. The original poster does. I guess that makes this news.
this is not news man! what if you use dynamic ip to connect to your box? there are a couple of solutions like auto-own-RBL, pam_tally, port 35 for example and so on anyone can add (pls do)
version 4.0 of OpenSSH has the option of hashing the known-hosts
database. There is also a patch for OpenSSH 3.9 that does the same
thing. Unfortunately, the option is not turned on by default.
hey guys this might be old new but i recently got alot of ssh login tries and when i got them i usually did a port scan and i found most of the ip's had port 80 open.
I've been getting this crap for quite a while, I origionaly just changed the ssh port to a non-standard port but that only fended off some of them. I still came home to a flooded log. I found this program called authfail http://www.bmk.bz/?p=33 that worked great for me. It by default logs 4 failed ssh login attempts from the same ip then puts the ip into iptables -j DROP all realtime. I had to hack the hell out of it to make it work(it read the ip wrong, started kinda crummy, and a few other things, and i made it add the ip to hosts.deny also), but looking at the website it appears that its been updated since i got it so maybe that stuff is fixed. Anyway, it's made my logs a whole lot smaller and keeps people from continualy hammering away at my sshd while allowing real traffic in(even with a few failed logins).
I agree johnny, snort is an excelent IDS with a plethora of configuration options, but thats one of the reasons im not using it right now. I am in the process of setting it up, but i want it quite fine-tuned before i get rid of authfail because at the moment the only crap i get is that garbage on my sshd, the rest is just idle scanning or other benign activity(and probably stuff i dont see because of a few iptables rules i have set).
The only thing authfail does is just watch your log for failed sshd attempts and after a certian (configurable) amount of fails, it adds the ip to iptalbes or wherever you tell it to put it. Considering the nature of this tool and what this thread is about, i think its the most focused tool for this job
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.