Intrusion Detection Systems are the software or applications which are positioned on network and host terminals to monitor the data that passes through those points. There are numerous kinds of Intrusion Detection Systems which either detect malicious behaviour of unauthorized user by matching his signature with already collected ones or by classifying it into normal or malicious access. The aim of this paper is to propose an Intrusion Detection System which is not domain specific, generic in nature and can be used both for detection of intrusions in a network or a computer. The algorithms proposed in this paper are optimized using nature inspired algorithms and based on Supervised and Unsupervised Learning Models. The usage of Nature Inspired Optimization Algorithms reduced the computational overhead of the proposed algorithms significantly. The proposed algorithms were validated and tested on three leading datasets from Network Security field namely, KDD99, ADFA and UNSW. The quality results generated on these datasets validate the use of these algorithms for Intrusion Detection in the real world.