Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Alexey Talikov <alexey_talikov@texlab.com.uz>
To: SB CH <chulmin2@hotmail.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: quota and time patch.
Date: Fri, 27 Sep 2002 09:29:01 +0500	[thread overview]
Message-ID: <1832391719.20020927092901@texlab.com.uz> (raw)
In-Reply-To: <F91y07vQONDZsbg5YX600007f11@hotmail.com>

Hello SB,

It is only example don't use it in real setup !!!!!!!
Add your additional rules for filtering !!!!!!!!!!!!!


Creat chain for every user (for optimal setup)
iptables -N user1
iptables -N user2
.........
# For user1
iptables -A user1 -m time --timestart 08:00 --timestop 09:00 --days \
Mon,Tue,Wed,Thu,Fri -m quota --quota 10485760 -j ACCEPT
iptables -A user1 -m time --timestart 09:00 --timestop 10:00 --days \
Mon,Tue,Wed,Thu,Fri -m quota --quota 10485760 -j ACCEPT
.........
iptables -A user1 -m time --timestart 16:00 --timestop 17:00 --days \
Mon,Tue,Wed,Thu,Fri -m quota --quota 10485760 -j ACCEPT

# For user2
iptables -A user2 -m time --timestart 08:00 --timestop 09:00 --days \
Mon,Tue,Wed,Thu,Fri -m quota --quota 10485760 -j ACCEPT
iptables -A user2 -m time --timestart 09:00 --timestop 10:00 --days \
Mon,Tue,Wed,Thu,Fri -m quota --quota 10485760 -j ACCEPT
.........
iptables -A user2 -m time --timestart 16:00 --timestop 17:00 --days \
Mon,Tue,Wed,Thu,Fri -m quota --quota 10485760 -j ACCEPT
.........

Send packets from users to his chain
# FORWARD

# For download limit
iptables -A FORWARD -i $IF1 -d $USER1_IP -j user1
iptables -A FORWARD -i $IF1 -d $USER2_IP -j user2
.........

# For upload limit
iptables -A FORWARD -i $IF1 -s $USER1_IP -j user1
iptables -A FORWARD -i $IF1 -s $USER2_IP -j user2
.........

# You can limit only upload or only download F.E. if you wish.
# Sorry for my pure English :((

-----------------------------------
mailto:alexey_talikov@texlab.com.uz
BR
Alexey Talikov
FORTEK
-----------------------------------



  parent reply	other threads:[~2002-09-27  4:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-27  2:30 quota and time patch SB CH
2002-09-27  3:27 ` Fabrice MARIE
2002-09-27  4:29 ` Alexey Talikov [this message]
2002-09-27  5:00   ` Fabrice MARIE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1832391719.20020927092901@texlab.com.uz \
    --to=alexey_talikov@texlab.com.uz \
    --cc=chulmin2@hotmail.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox