change next hop or destination MAC after routing

Amin Azez azez at ufomechanic.net
Tue Jun 19 14:12:01 CEST 2007


* pankaj jain wrote, On 19/06/07 12:06:
> Hi,
> 
> In machine generated packets, can I change the next hop OR destination
> MAC after routing?
> Is it possible to do this in POSTROUTING table of iptables or ebtables?
> 
> Do we have any other technique to achieve the same? Any utility /
> patch / kernel change etc ?

The "route" match might achieve this for you; it works though by
transmitting the packet instantly and may skip any remaining rules
depending on how you use it.

Or maybe you could use ebtables DNAT, I suspect that is a better way.

You could use a packet mark to communicate this intent to ebtables.

Sam




More information about the netfilter-devel mailing list