The Coarse-to-Refined Grid Search Support Vector Machine (GS-SVM) is an improvement on One-class Support Vector Machine (SVM). This study provides a solution for Intrusion Detection System (IDS) based on support vector machine. In practice, it is inefficient for SVM to identify massive intrusive behaviors which will exhaust memory resources. In addition, the accuracy of classification is subject to data preprocessing and parameter selection. In order to obtain precise detection rate, it is crucial to optimize the related parameters for proper kernel function. For this reason, an optimization algorithm based on grid search is proposed. Experiments over networks connection records from KDD 99 data set are implemented for 1-vs-N SVM to evaluate the proposed method. This approach reduces the training time, accelerates the speed of Cross Validation and improves the adaptability of the IDS.