Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-04-2007, 04:19 PM
|
#1
|
Member
Registered: Jan 2007
Distribution: Debian
Posts: 223
Rep:
|
Blocking IP
Code:
Apr 4 05:00:40 computer pure-ftpd: (?@219.136.254.102) [WARNING] Authentication failed for user [Administrator]
How would i use hosts.deny to block this IP from trying to access my machine anymore? And can someone give me a site where i can read about some software that detects failed logins and bans them? Thanx in advance!
|
|
|
04-04-2007, 04:28 PM
|
#2
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
You could use hosts.deny, but most people at this point would rather it be handled by an adaptive firewall. Ideally you would only want to block an IP for a set amount of time (rather than permanently) as you can block IPs that might otherwise have had legitimate users. For example, if somebody at a college port scanned your server and you blocked the IPs for that school, other people at that school would not be able to legitimately access you server forever.
If you only block IPs as soon as the attack starts and then unblock them in a day or so, by the time the IP has been unblocked the attacker will likely be using a new IP (or more likely just moved on to the next target).
At any rate, that is what you want to be looking into to automatically block IPs based on failed authorization attempts, adaptive firewalls. It is a rather large subject though, so be prepared to do a bit of research before you find one that suits your needs.
|
|
|
04-04-2007, 05:07 PM
|
#3
|
Member
Registered: Jan 2007
Distribution: Debian
Posts: 223
Original Poster
Rep:
|
The firewall i use blocks the use of my ftpd. Im going to be looking into failed auth logins later on. But for now i'd just like to know how to block the IP. If anyone could just tell me how to do it with hosts.deny i'd appreciate it. Thanx in advance.
|
|
|
04-05-2007, 12:13 PM
|
#4
|
LQ Newbie
Registered: Nov 2006
Location: Kerala
Distribution: Fedora, Debian, RHEL
Posts: 29
Rep:
|
Add following to hosts.deny
ALL:219.136.254.102
---------------------------------
OR
You can type following in command line for blocking via iptables..
iptables -I INPUT -s 219.136.254.102 -j DROP
---------------------------------------------------------------------------
You can use apf with bfd for doing it simply..
BFD will find Brute Force attempts and block them.
Using apf you can block an IP very simply by
#apf -d 219.136.254.102
|
|
|
All times are GMT -5. The time now is 03:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|