There are simply and easy ways to prevent rushes
the easiest is mine the first 3 crates you see with your beginning unit and then send it straight to your opponents base to see if he or she is rushing you can tell by what they have qued up for production.
if you are UNSC do not build turrets simply mass flamthrowers and in 2v2 game help eachother when one gets rushed
If you are COV rushes simply are not very effective against you, but you must not use you leaders ability early in the game when you do that it makes you lose to the rush, but still do the mine and scout and continue mining with your leader as he mines very quickly.
scout often and build accordingly