Online (Web-based) examination is an effective solution for mass education evaluation. However, due to the incomplete of network security, students can communicate with each other, and we can't prevent the cheating. Therefore, keeping the security of a online examination has become an important issue. This paper focuses on how to implement a secure environment for online-examination in the general academic network environment without the need of special network topologies and hardware devices. It not only reduces the system administrator's load, but also enhances the system flexibility to fit every teacher's needs. We use (1) the distributed firewall techniques to control the network packets of all machines, and (2) the centralized security policy management to control the security policies for all machines. Beside the above mentioned , we also design some mechanisms to prevent the possible network attacks and cheating, which enhance the security of the online examinati...