With The Evolution In Wireless Communication, There Are Many Security Threats Over The Internet. The Intrusion Detection System (IDS) Helps To Find The Attacks On The System And The Intruders Are Detected. Previously Various Machine Learning (ML) Techniques Are Applied On The IDS And Tried To Improve The Results On The Detection Of Intruders And To Increase The Accuracy Of The IDS. This Paper Has Proposed An Approach To Develop Efficient IDS By Using The Principal Component Analysis (PCA) And The Random Forest Classification Algorithm. Where The PCA Will Help To Organise The Dataset By Reducing The Dimensionality Of The Dataset And The Random Forest Will Help In Classification. Results Obtained States That The Proposed Approach Works More Efficiently In Terms Of Accuracy As Compared To Other Techniques Like SVM, Naive Bayes, And Decision Tree. The Results Obtained By Proposed Method Are Having The Values For Performance Time (min) Is 3.24 Minutes, Accuracy Rate (%) Is 96.78 %, And The Error Rate (%) Is 0.21 %.