Quote:
Originally Posted by ghostdog74
Ever heard of libpcap? you can use it to do what you want.
|
libpcap can be used to capture incoming packets and send packets via a specified network interface, however, I learned that it only captures and is incapable of preventing the incoming packets from being passed to the protocol stack (and the application). That is to say, it cannot be used to make a firewall or NAT.
Fortunately, now I find that
netfilter can take the full control of all packets on a host, thus can help me to do that...