ograniczenie po
ograniczenie połączeń
Mam w sieci użytkownika, który nagminnie nawiązuje dużą ilość połączeń. Najprawdopodobniej jest to jakiś p2p. Tu pojawia się kłopot bo połączenia, które nawiązuje idą przez UDP. Czy da się to jakoś sensownie ograniczyć przy pomocy iptables?
Pewnie że można:Luc3k pisze:Da się to jakoś sensownie ograniczyć przy pomocy iptables?
Kod: Zaznacz cały
iptables -A OUTPUT -p udp -m owner --uid-owner nick -m connlimit --connlimit-above limit -m multiport --dport porty -j REJECT
To:
Kod: Zaznacz cały
man iptables
Kod: Zaznacz cały
[!] -s, --source address[/mask]
Source specification. Address can be either a network name, a hostname (please note that specifying any name to be resolved with a remote query such as DNS is a
really bad idea), a network IP address (with /mask), or a plain IP address. The mask can be either a network mask or a plain number, specifying the number of
1’s at the left side of the network mask. Thus, a mask of 24 is equivalent to 255.255.255.0. A "!" argument before the address specification inverts the sense
of the address. The flag --src is an alias for this option.
Kod: Zaznacz cały
[!] -d, --destination address[/mask]
Destination specification. See the description of the -s (source) flag for a detailed description of the syntax. The flag --dst is an alias for this option.