This paper describes in detail a real-time intrusion detection model based on neural networks, the processing of network data and the training algorithm of neural networks. It turns out that using neural networks can improve the efficiency and intelligence of intrusion detection.