I would like to emulate arrival of traffic on a specific interface (e.g. eth0). I have quite strict requirements (and quite possibly this is not possible):
- I need to emulate arrival on a specific interface. E.g. on eth0. Sending the packets on another interface (e.g. tap0) does not resolve my problem.
- The solution has to be self contained, i.e. not involving another machine, not requiring connection of cables between interfaces or whatever other 'external' solutions.
To provide some context, I need the packets that I am sending to traverse the ip chain (specificlly I'm interested in netfilter hooks) exactly as if arriving on the defined interface. For example, if a rule exists in the iptables in the FORWARD chain of the filter table whose acceptance rule is '-i eth0', then the rule should match any packet sent by the requested mechanism.