I'm trying to capture and manipulate incoming IP packets (via eth0 interface) by using a TUN device (since I'm only concerned with IP layer). The first step I think is 1:1 packet forwarding from eth0 to tun0, but I can't get this to work via iptables and/or routing tables. What am I doing wrong? Is there a simple way to do this? I enabled IPv4 forwarding in Fedora and added all the correct iptables rules, but it doesn't seem to work, no matter what I try. Is there an easier way to go about this? Normally I could just use libpcap, but I need to be able to drop packets and other options I haven't seen in libpcap. Any advice would be greatly appreciated.
I think the simplest way is to bridge the two interfaces. This way you don't need to mess with
|show 2 more comments|