Skocz do zawartości
infi

iptables wyjątek

Polecane posty

Witam,

Chciałbym dodać do tej komendy wyjątek na jakiś adres IP tak, aby ograniczenie nie było dla niego stosowane, ale jestem zielony w iptables i nie mam pojęcia jak to zrobić. Potrzebuję pomocy.

sudo iptables -I INPUT -p tcp --dport 25565 -m state --state NEW -m recent --set
sudo iptables -I INPUT -p tcp --dport 25565 -m state --state NEW -m recent --update --seconds 5 --hitcount 20 -j DROP
Edytowano przez infi (zobacz historię edycji)

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Reguły są przetwarzane po kolei - do której wpadnie pakiet, taka akcja jest realizowana i kolejne reguły nie są brane pod uwagę.
Dodam, że:

-A, --append chain rule-specification Append one or more rules to the end of the selected chain. When the source and/or destination names resolve to more than one address, a rule will be added for each possible address combination.
-I, --insert chain [rulenum] rule-specification Insert one or more rules in the selected chain as the given rule number. So, if the rule number is 1, the rule or rules are inserted at the head of the chain. This is also the default if no rule number is specified.

Teraz chyba powinieneś zrozumieć i sobie poradzić :)

Edytowano przez Bartosz Z (zobacz historię edycji)

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Zaloguj się, aby skomentować

Będziesz mógł dodać komentarz po zalogowaniu się



Zaloguj się

×