A carrier-class billing gateway model based on Linux kernel is designed, and a billing system prototype using Linux kernel for packet filtering on x86 hardware is realized. The main research work of the paper: using the Netfilter framework, the packet reassembly at the network layer and the header analysis at the application layer were completed; The HTTP protocol data stream is parsed and filtered in the kernel, and the important information required for billing is extracted. The system prototype was tested with an example using an x86 telecom server, and the availability of the system was proved through performance analysis.