This document proposes a Restricted Access Protocol (RAP) to enhance security and eliminate DDoS attacks in mobile ad-hoc networks (MANETs). The RAP first compares incoming packet extensions to a database of known malicious extensions to identify potential attacks. If no match is found, it encrypts the data using RSA encryption before transmission. The RAP aims to prevent DDoS attacks by blocking repeated malicious data and increasing encryption. Simulation results showed the RAP increased network security by 80% by combining extension matching with encryption and restricted user authentication.