Using TAP to sniff or modify incoming eth packets

185 views Asked by At

I've tried https://github.com/TOGoS/TUN2UDP

This allows me to do:

Application --> TAP 
Read from TAP --> Write to UDP (under my control)
Read from UDP --> Write to TAP (under my control)
TAP --> Application

What I want to do is:

Application --> ETH
Read from ETH --> Write to TAP (under my control)
TAP --> Application

In other words I want to intercept incoming packets at layer 2 and have control to block them, modify them, or pass them through.

I think perhaps bridging ETH and the TAP is the key but I can't figure out how to access this bridge programmatically in the way I need.

0

There are 0 answers