LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-12-2005, 10:45 AM   #1
basketkase999
Member
 
Registered: Dec 2004
Location: ca
Posts: 61

Rep: Reputation: 15
Blocking IP Range


I just put up a new server and am seeing a lot of failed ssh attempts from the 219.x.x.x range. I know you can deny the range, but how?. I want to know if i should use iptables to block the range (and how to do it), or if i should use the hosts allow/deny files to block. I am a newb when it comes to this thing so i would apprecaite it if you can be as simplistic as possible. Thanks!
 
Old 03-12-2005, 12:04 PM   #2
serverguru
LQ Newbie
 
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
Hi,
If you want to block complete range you can use CIDR mask bits.
In your case to block 219.x.x.x IP range, just use Source Ip range 219.0.0.0/8 while adding to IPtables.

Here is example command

iptables -A INPUT -s 219.0.0.0/8 -J DROP


Hope this helps you.
 
Old 03-12-2005, 12:23 PM   #3
basketkase999
Member
 
Registered: Dec 2004
Location: ca
Posts: 61

Original Poster
Rep: Reputation: 15
Thanks a lot, i just set that up, i will check the logs in 24 hours and hope i don't see that range!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
get ip range. bruse Linux - Wireless Networking 2 08-23-2005 07:37 AM
Out of range peterx1 Red Hat 1 09-17-2004 11:23 AM
Out of range Elyubarov Linux - Hardware 1 08-12-2004 08:49 PM
out of range... andy010 Red Hat 5 11-19-2003 07:06 PM
out of range... Rowsdower11 Red Hat 6 11-17-2003 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration