how can i stop Ddos attacks on my forum
Use cloudflare .
Redirect your traffic through cloudflare.
#CF won't protect you 100%.
This isn't something you can do at application level. Contact your web host.
Yep talk to your web host, a good one would help you.