LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-12-2015, 09:25 AM   #1
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
iptable quotas by ip


I'm looking to prevent a visitors from downloading +100M in a day from my website.

Most guides show just this, or with a -s ip_addr
Code:
iptables -A OUTPUT -p tcp -m quota --quota 104857600
I want this to apply individually to each ip address, so I can't use a -s match.

The problem is this is with OUTPUT, so it's universal, once a cumulative 100M has been reached - everyone has been blocked (not to mention SSH)
I presume that these connections are established, should I limit those? instead?
 
Old 08-12-2015, 11:33 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Adding the '! -s 22' to your rule will allow ssh even when the quota is reached.
I'm not sure using the firewall to limit is the way you want to go here.

Last edited by lazydog; 08-12-2015 at 11:34 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
iptable how many rule iptable can manage toure32 Linux - Networking 1 05-13-2010 04:34 AM
what is an iptable? & how to seperate the network on the basis of iptable vinod.wagh Linux - Networking 1 09-11-2008 01:28 AM
quotas.. shishirkotkar Linux - Newbie 1 02-07-2008 09:59 PM
quotas shishirkotkar SUSE / openSUSE 1 01-31-2008 08:27 AM
quotas help venki Linux - Newbie 2 12-08-2006 02:20 PM

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

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