Usually the server would recognize the attack and ip ban or simply ban it for a specific time.
In the case of that not happening I believe that people in eA are most likely selling addons/mods that you can add to your server in order to prevent such things from happening, but I don't think you'll ever be 100% safe.
Especially if the attack is a ddos, dos would be preventable. since DDoS stands for distributed denial of service, which means there are a lot of other computers meaning a lot of other ip's involved. Usually your provider should also have kind of filter against that.
Anybody wanna disprove me? I'm not 100% sure but I think I'm close.