If by "flood attack," you mean a
DDoS, there's really nothing you can do to stop it. The attack is coming from outside your sphere of control.
I did a bit of work some years back for a hosting provider. As I recall, if a website on a shared server became the target of a DDoS, their first course of action was to move the
other shares on that server to a different server to bring them back live. There wasn't much they could reasonably do to stop the attack itself before it petered out on its own--and most attacks do eventually peter out on their own.