I am trying to implement a mini firewall on my Linux machine that filters different layer protocols. So far, I have been successful in filtering packets up to the TCP layer using Netfilter. However, I am now trying to filter application protocols(Deep packet inspection), and I am facing issues.
I have tried using Netfilter to parse the TCP/UDP payload, but I am not able to get the content of the packets, It always shows the payload as 0 but in Wireshark I can see some data. I want to filter the packets before they enter the application layer.
Are there any other approaches to filtering application protocols in Linux that I can use in addition to Netfilter?
Program I tried to get the HTTP data: Unable to parse HTTP packet using netfilter hooks in kernel module