~ubuntu-branches/ubuntu/quantal/iptables/quantal-proposed

« back to all changes in this revision

Viewing changes to extensions/libxt_connlimit.man

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella
  • Date: 2009-05-06 16:35:21 UTC
  • mfrom: (5.1.6 upstream) (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20090506163521-2hbruo0m33h04wxf
Tags: 1.4.3.2-2ubuntu1
* Merge from debian unstable (LP: #372920), remaining changes:
  - Don't fail to run iptables-save if iptables module isn't loaded.
  - debian/patches/0901-build-libipq_pic.a.patch - Build libipq_pic.a with
    -fPIC. Upstream changed build system and patch modified accordingly.
  - Revert changes between 1.4.1.1-3 and 1.4.1.1-4, thus bringing back
    the howtos.
* Droped unexistent patches from debian/patches/series
* Droped 0903-autoload-module-in-iptables-save.diff, fixed upstream
* Added linuxdoc-tools to Build-Depends
* Modified debian/iptables{,-dev}.install to match DM syntax 
  (removed debian/tmp)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Allows you to restrict the number of parallel connections to a server per
2
2
client IP address (or client address block).
3
3
.TP
4
 
[\fB!\fP] \fB--connlimit-above\fP \fIn\fP
 
4
[\fB!\fP] \fB\-\-connlimit\-above\fP \fIn\fP
5
5
Match if the number of existing connections is (not) above \fIn\fR.
6
6
.TP
7
 
\fB--connlimit-mask\fR \fIprefix_length\fR
 
7
\fB\-\-connlimit\-mask\fP \fIprefix_length\fP
8
8
Group hosts using the prefix length. For IPv4, this must be a number between
9
9
(including) 0 and 32. For IPv6, between 0 and 128.
10
10
.P
11
11
Examples:
12
12
.TP
13
13
# allow 2 telnet connections per client host
14
 
iptables -A INPUT -p tcp --syn --dport 23 -m connlimit --connlimit-above 2 -j REJECT
 
14
iptables \-A INPUT \-p tcp \-\-syn \-\-dport 23 \-m connlimit \-\-connlimit\-above 2 \-j REJECT
15
15
.TP
16
16
# you can also match the other way around:
17
 
iptables -A INPUT -p tcp --syn --dport 23 -m connlimit ! --connlimit-above 2 -j ACCEPT
 
17
iptables \-A INPUT \-p tcp \-\-syn \-\-dport 23 \-m connlimit ! \-\-connlimit\-above 2 \-j ACCEPT
18
18
.TP
19
19
# limit the number of parallel HTTP requests to 16 per class C sized \
20
20
network (24 bit netmask)
21
 
iptables -p tcp --syn --dport 80 -m connlimit --connlimit-above 16
22
 
--connlimit-mask 24 -j REJECT
 
21
iptables \-p tcp \-\-syn \-\-dport 80 \-m connlimit \-\-connlimit\-above 16
 
22
\-\-connlimit\-mask 24 \-j REJECT
23
23
.TP
24
24
# limit the number of parallel HTTP requests to 16 for the link local network \
25
25
(ipv6)
26
 
ip6tables -p tcp --syn --dport 80 -s fe80::/64 -m connlimit --connlimit-above
27
 
16 --connlimit-mask 64 -j REJECT
 
26
ip6tables \-p tcp \-\-syn \-\-dport 80 \-s fe80::/64 \-m connlimit \-\-connlimit\-above
 
27
16 \-\-connlimit\-mask 64 \-j REJECT