I've just read in these answers about two options for developing packet filters in linux.
The first is using iptables and netfilter, probably with NFQUEUE
and libnetfilter_queue library.
The second is by using BPF (Berkeley Packet Filter), that seems in a quick reading to have similar capabilities for filtering purposes.
So, which of these alternatives is a better way to create a packet filter? What are the differences? My software is going to run as a gateway proxy, or "man-in-the-middle" that should receive a packet from one computer (with destination address to another one, not the filter's local address), and send it out after some filtering.
Thanks a lot!