LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-01-2004, 04:03 AM   #1
enzo250gto
Member
 
Registered: Oct 2001
Location: Tokyo, Japan
Distribution: Slackware
Posts: 105

Rep: Reputation: 15
how to block an entire IP range?


I'm getting unwanted traffic to my server and would like to block and entire IP range.

I want to block 219.118.xx.xx

How can I do this?
 
Old 05-01-2004, 07:17 AM   #2
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
What kind of server?

If its a apache webserver in your .htaccess file in the directory you want blocked; the top directory to block all the pages under it add the lines
Deny From 219.118
and it will block all IP's starting with that, if you dont use .htaccess files you could also put that in the <Directory> </Directory> in the httpd.conf file as well.

Oh for the .htaccess files to work in httpd.conf you need to put in the <Directory> </Directory>
AllowOverride All

If you are referring to a diff server I can not help you as I only know apache.. for the moment.

Last edited by Zero-0-Effect; 05-01-2004 at 09:10 PM.
 
Old 05-01-2004, 08:59 AM   #3
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
it is possible to block them with iptables. the foolowing command will drop the all of requests come from 219.118.x.x
iptables -A INPUT -s 219.118.0.0/16 -j DROP

Last edited by maxut; 05-01-2004 at 09:01 AM.
 
  


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
What is best way to ghost an entire partition onmountain Linux - General 8 10-29-2005 11:47 AM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
IP Table help, Droping entire 200 block of ip's? Wide glide Linux - Security 2 12-03-2004 12:39 AM
get Squidguard to block entire countries web sites? Possible? Pcghost Linux - Software 3 09-19-2004 02:25 PM
entire neighborhood slack66 Linux - Newbie 7 04-11-2004 09:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:05 AM.

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