Nowadays, network security has been received more attention from researchers. Intrusion detection systems (IDSs) serves as an essential element of network security. In order to increase the network's security, machine-learning algorithms may be utilized for the detection and prevention of the attacks that launched against the network. The researcher of this study used LightGBM's algorithm for training a model in order to detect several types of network attacks. The proposed approach was compared with classical machine learning in terms of performance on the same dataset. The experimental results show that the proposed approach achieves a detection rate of 97.4% with a false-positive rate of 0.9%.