Security is an important aspect to be considered in computer networks. This security system can be a detection and prevention of attacks that are being done by the attacker (intruders). The problem of attacks that occur in computer networks is that intruders can do port scanning, enter the system using open ports such as telnet, ftp and others.. The purpose of this study is the implementation of IDPS, can be from. To do network security from various attack threats, a system that can detect and prevent it directly is needed. The method that can be used is Intrusion Detection and Prevention System (NIDPS). NIDPS can exchange and block the attacks. This security system is collaborated with IP Tables. IP Tables is used to filter incoming data packets and drop packets of data that are indicated by attack. With the Intrusion Detection and Prevention system, it can detect attacks and prevent them by blocking data packets sent by intruders through port scanning, FTP attacks, and telnets.