Skip to contentSkip to conversation

change next hop or destination MAC after routing

DISCUSSION pankaj jain 2 participants 2 messages Jun 19, 2007 netfilter

lore
Share & tools
lore
#0 lore raw

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 ?

Signature · 2 lines
Thanks
Pankaj Jain
#1 lore raw

* pankaj jain wrote, On 19/06/07 12:06:

Quoted 8 lines

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