iptables TCP-Regeln

iptables TCP-Regeln
iptables -t raw -F
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Mozil" --algo kmp --to 65535 -m tcp --dport 1000   # You can change the port here
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Saf" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Edge" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Oper" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Chrom" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Gecko" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Andr" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "exch" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Fire" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Wind" --algo kmp --to 65535 -m tcp --dport 1000

Wenn ich versuche, aufhttp://127.0.0.1:1000/es lehnt die Verbindung ab, aber wenn ich versuchehttps://127.0.0.1:1000Ich konnte zugreifen, warum? Danke übrigens!


Es handelt sich um einen Anwendungsserver, der auf Ebene 7 mit DDoS angegriffen wird. Ich habe nicht die Quelle der Anwendung, daher gibt es keine Lösung zum Blockieren auf iptables? Was passiert, wenn ich Port 443 mit denselben Regeln blockiere?

Antwort1

Weil HTTP Klartext ist und HTTPS verschlüsselt ist.

Abgesehen davon würde ich dringend davon abraten, diese Methode zum Blockieren bestimmter Benutzeragenten zu verwenden – dies sollte auf dem Webserver selbst erfolgen.

verwandte Informationen