LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 06-27-2008, 01:33 PM   #1
jeff80
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Rep: Reputation: 0
blocking ips


Hello

I want to block complete range of ip on my server for example

all the ips starting with 10.9

Please let me know how I can do this.

Thank you

Regards!
Jeff80
 
Old 06-27-2008, 02:24 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Uhh.... You're on a private network and want to get rid of
a subnet?
 
Old 06-27-2008, 06:35 PM   #3
jeff80
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Hello

Yes I am on a private network and want to ban the subnet.

Please update me how it can be done.

Thank you

Regards!
Jeff80
 
Old 06-27-2008, 06:42 PM   #4
jeff80
LQ Newbie
 
Registered: Jan 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Hello

Will this work
iptables -I INPUT -s 10.9.0.0/16 -j DROP ?
 
Old 06-27-2008, 08:27 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That should indeed do the trick (at least for incoming connections
and if you don't let established connections [such that came FROM
that sever TO that subnet] pass before the generic drop).


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Blocking IPs log from honeyd crackyblue Linux - Enterprise 3 09-19-2007 10:07 PM
Blocking ips from access andy1974 Linux - Security 5 06-27-2007 06:21 AM
Blocking A Class of Ips w/ Iptables kemplej Linux - Security 4 09-03-2004 11:02 AM
Blocking IPs bluelaguna Linux - Security 2 05-28-2004 02:08 PM
Blocking IPS clanehleader Linux - Security 2 09-01-2003 10:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11: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