Bloqueando dominios extranjeros apuntados a Plesk

Podría estar sucediendo por accidente porque alguien en Internet configuró mal la dirección IP. Pero a veces esto también podría ser una forma de atacar un servidor. Puede bloquear solicitudes para el dominio externo que se dirigen a su servidor agregando esto a iptables:
Code:
# iptables -I INPUT 1 -p tcp -m multiport --dports 80,443,7080,7081,8443,8447 -m string --algo bm --string "DOMAIN.TLD" -j REJECT --reject-with tcp-reset

# iptables -I FORWARD 1 -p tcp -m multiport --dports 80,443,7080,7081,8443,8447 -m string --algo bm --string "DOMAIN.TLD" -j REJECT --reject-with tcp-reset

# iptables -I OUTPUT 1 -p tcp -m multiport --dports 80,443,7080,7081,8443,8447 -m string --algo bm --string "DOMAIN.TLD" -j REJECT --reject-with tcp-reset

Replace “DOMAIN.TLD” with the foreign domain for that you wish to block all traffic.

Leave a Comment