Intrusion attacks have been the major concern in user's daily life. Firewall has been useful for certain attacks, but it has its own limitation and can be bypasses. Intrusion detection and prevention is the method of identifying and preventing unauthorized use, misuse and abuse of computer system by both insiders and external attackers. In this paper, the authors are proposed to use artificial immune system based on danger theory. According to danger theory the immune system does not respond to non-self but to danger. Thus, there is no need to attack everything that is foreign. The foreign entity, which causes damage to user's cells, has to be killed. The proposed system identifies the attack uses this theory.