From 727e8f40cd9196c9a617d37a96bc1deba610caac Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Mon, 14 Apr 2008 07:09:49 +0000 Subject: [PATCH 5/8] Combine ipt and ip6t manpages Combine ipt and ip6t manpages --- extensions/libxt_connlimit.man | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 extensions/libxt_connlimit.man (limited to 'extensions/libxt_connlimit.man') diff --git a/extensions/libxt_connlimit.man b/extensions/libxt_connlimit.man new file mode 100644 index 0000000..dd6a155 --- /dev/null +++ b/extensions/libxt_connlimit.man @@ -0,0 +1,27 @@ +Allows you to restrict the number of parallel connections to a server per +client IP address (or client address block). +.TP +[\fB!\fP] \fB--connlimit-above\fP \fIn\fP +Match if the number of existing connections is (not) above \fIn\fR. +.TP +\fB--connlimit-mask\fR \fIprefix_length\fR +Group hosts using the prefix length. For IPv4, this must be a number between +(including) 0 and 32. For IPv6, between 0 and 128. +.P +Examples: +.TP +# allow 2 telnet connections per client host +iptables -A INPUT -p tcp --syn --dport 23 -m connlimit --connlimit-above 2 -j REJECT +.TP +# you can also match the other way around: +iptables -A INPUT -p tcp --syn --dport 23 -m connlimit ! --connlimit-above 2 -j ACCEPT +.TP +# limit the number of parallel HTTP requests to 16 per class C sized \ +network (24 bit netmask) +iptables -p tcp --syn --dport 80 -m connlimit --connlimit-above 16 +--connlimit-mask 24 -j REJECT +.TP +# limit the number of parallel HTTP requests to 16 for the link local network \ +(ipv6) +ip6tables -p tcp --syn --dport 80 -s fe80::/64 -m connlimit --connlimit-above +16 --connlimit-mask 64 -j REJECT -- cgit v1.2.3