With the increasing use of a variety of services and applications in the real world network environment, identifying malicious behavior in traffic patterns generated by different applications has become challenging. Many existing methods use a technique and a dataset with specific limitations. But in the real world, applications may have different datasets. In addition, the nonlinear behavior of the dataset is another challenge for detecting anomalous data. Several researches have been done in this area, but it is still an open research topic and less used in the real world. In general, existing methods consider a set of assumptions about training data and validation methods, while the created system cannot be used in the real world. In this paper, we present a new approach to create a valid attack dataset. Also, a new validation strategy is provided and so an SVM-based feature selection method is proposed to implement the intrusion detection system. The evaluation results show that the proposed feature selection method improves the system accuracy by considering the important features of the real network during the modeling process.