
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
내가 접근하려고 하면http://127.0.0.1:1000/연결을 거부하지만 시도하면https://127.0.0.1:1000접근할 수 있었는데, 왜죠? 그런데 감사합니다!
레이어 7에서 DDoS 공격을 받고 있는 애플리케이션 서버입니다. 애플리케이션의 src가 없어서 iptables를 차단할 솔루션이 없나요? 동일한 규칙으로 포트 443을 차단하면 어떻게 되나요?
답변1
HTTP는 일반 텍스트이고 HTTPS는 암호화되어 있기 때문입니다.
그 외에도 특정 사용자 에이전트를 차단하는 데 이 방법을 사용하지 말 것을 진지하게 제안합니다. 이 방법은 웹 서버 자체 내에서 수행되어야 합니다.