Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have write a firewall rules for DDWRT router but I didn't work. What I needed is, I would like to set all my wireless user, once it reach daily quota which is 200mb it will disconnected from the service or throttle the internet speed.

iptables -A INPUT -p tcp --dport 80 -m quota --quota 2048 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 80 -m quota --quota 2048 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A OUTPUT -p tcp --dport 80 -j DROP
share|improve this question
    
What does it do? Is the limit ignored? I believe 2048 is k so it is now 2mb. –  cybernard Aug 6 '13 at 14:27
    
Ya just 2048 is for testing. The actual amount is 2GB –  soundsticks Aug 7 '13 at 8:11
    
1. Does it limit traffic at all? 2. Does it cut off traffic before the expected limit? –  cybernard Aug 10 '13 at 17:01
    
How many NICs do you have and what do they connect to? –  cybernard Aug 10 '13 at 17:13
    
So far you have told the computer to cut off traffic on ALL network cards after the quota has been reached. If you have eth0 and eth1, for example you need to separate the 2 nics from the INPUT queue or both NICs willbe affected. –  cybernard Aug 10 '13 at 17:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.