Advertisement
Kiryakov

Untitled

Sep 22nd, 2020
1,301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.45 KB | None | 0 0
  1. iptables -A INPUT -s 127.0.0.1/32 -j ACCEPT
  2. iptables -A INPUT -p tcp -m string --string "Saf" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  3. iptables -A INPUT -p tcp -m string --string "Edge" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  4. iptables -A INPUT -p tcp -m string --string "Mozil" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  5. iptables -A INPUT -p tcp -m string --string "Oper" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  6. iptables -A INPUT -p tcp -m string --string "Chrom" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  7. iptables -A INPUT -p tcp -m string --string "Gecko" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  8. iptables -A INPUT -p tcp -m string --string "Andr" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  9. iptables -A INPUT -p tcp -m string --string "exch" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  10. iptables -A INPUT -p tcp -m string --string "Fire" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  11. iptables -A INPUT -p tcp -m string --string "Wind" --algo kmp --to 65535 -m tcp --dport 30120 -j DROP
  12. iptables --new-chain RATE-LIMIT
  13. iptables --append INPUT --match conntrack --ctstate NEW -p tcp --dport 30120 --jump RATE-LIMIT
  14. iptables --append RATE-LIMIT \
  15.     --match hashlimit \
  16.     --hashlimit-mode srcip \
  17.     --hashlimit-upto 1/min \
  18.     --hashlimit-burst 1 \
  19.     --hashlimit-name conn_rate_limit \
  20.     --hashlimit-htable-max 262144 \
  21.     --hashlimit-htable-size 65536 \
  22.     --jump ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement