Due to a particular network configuration, I would like to associate MAC addresses to outgoing Ethernet frames using iptables instead of the ordinary ARP resolution, or at least have the ability to mangle packets after they have already received their destination MAC address. Is this possible with Linux?

What in particular I would like to do is to mangle an outgoing packet so that it is sent to a certain MAC address while carrying the IP address of another host.

  • You might want to use ebtables for this instead. Feb 6, 2016 at 14:15
  • @saiarcot895 I specified better what I need. I can see no way to do this with ebtables. Do you have any specific advise? Feb 6, 2016 at 14:55

1 Answer 1


It seems what you want can be done easier than with ebtables (redirect target).

If you want all packets with a certain IP target address to be sent to a certain MAC address then you can simply create a static ARP entry for this address:

ip neighbour add lladdr 11:22:33:44:55:66 dev eth0 nud permanent
  • Due to race conditions (eg ARP just happened), using replace instead of add should make this command more reliable.
    – A.B
    Dec 16, 2020 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .