SDN (Software-Defined Network) is a network in which the control plane functionality is separated from the packet forwarding layer. The paper is devoted to the study of the SDN security. A comparison of neural networks with various parameters on existing dataset is presented. CSE-CIC-IDS2018 dataset [12] provided by Canadian Institute for Cybersecurity (CIC) on AWS (Amazon Web Services) was chosen. It contains of the most relevant types of network attacks. Results show that a simple neural network, such as a multi-layer perceptron, can be used to provide basic protection against most attacks. To provide more reliable protection, complex neural networks should be used. The presented LSTM-based model showed a very good result of intrusion detection. © 2020 Elsevier B.V.. All rights reserved.