The increasing development of decentralized computer systems that interact extensively has increased the criticality of confronting cyberattackers, hackers, and terrorists. With the development of cloud computing and its widespread use, as well as its dispersed and decentralized character, a unique security measure is required to safeguard this architecture. By monitoring, validating, and managing settings, records, internet traffic, usage data, as well as the operations of specific activities, firewalls can distinguish between normal and unexpected behaviours, thus adding additional network security to cloud computing systems. The location of network security mechanisms in cloud computing environment and also the methods employed in such methods are the two primary aspects where many studies have concentrated their efforts. The objective of such studies is to reveal as many incursions as feasible and to improve the pace and correctness of sensing while minimizing false alarms. Nevertheless, these methods have a large computing burden, a poor degree of precision, and a large time consumption. We propose an accurate and complete approach for detecting and preventing assaults in cloud computing environment via the use of a machine learning techniques both supervised and un-supervised. The operational findings demonstrate that the suggested approach substantially increases attack detection, network security correctness, dependability, and accessibility in cloud computing environment, while drastically reducing false alarms.