Pergunta
How do I create an iptables rule to block traffic on a specific port (e.g., port 80) during a DDoS attack?
Perguntado por: USER2483
106 Visto
106 Respostas
Resposta (106)
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.