With rapid development of the Internet, Internet surfing has been an important daily activity for peoples. There are many websites and web pages containing obscene and malicious information such as phishing, spam and pornography that peoples can easily obtain. In order to improve network security service, we developed and implemented a content-based filter system on an embedded Linux home gateway. We analyzed and compared two feasible approaches that the content-based filter was respectively embedded into user space and kernel space of Linux home gateway. The content-based filter system comprises URL (Universal Resource Locator) blocker and keyword filter in the kernel space. The Linux home gateway embedded with our new content-filter was evaluated by extensive experiments. The experiment results showed that the content filter method that based modification of kernel space outperforms around 35% improvements than that of based on user space.