How do I create an iptables rule to block traffic on a specific port (e.g., port 80) during a DDoS attack?

Responsive Ad Header

Pergunta

Classe: Education Matéria: Ddos
How do I create an iptables rule to block traffic on a specific port (e.g., port 80) during a DDoS attack?
Perguntado por:
106 Visto 106 Respostas

Resposta (106)

Resposta Melhor
(323)
You can create a rule like this: `iptables -A INPUT -p tcp --dport 80 -j DROP`. This rule will drop all TCP traffic destined for port 80. You can add more rules to block other ports as needed. Remember to save the iptables configuration (e.g., `iptables-save > /etc/iptables/rules.v4`) so the rules persist after a reboot.