Score:0

How to change destination mac address with iptables

cn flag

How to replace MAC address of a IP packet with iptables(if possible)?

I can only find examples of --mac-source rules used in iptables but those are used to MATCH not to replace mac address.

My problem is that i have one way fiber connection and broadcasts sent from sending side are dropped on receiving side (I can see them in tcpdump but these are dropped somewhere). Packets are dropped before entering FILTER:forward i know that because in NAT:prerouting I am changing destination address from ex. 192.168.1.255 to ex. 192.168.1.69 and iptables counters are idicating it is done.

My presumption is that kernel dropps there packets because destination MAC is FF:FF:FF:FF:FF:FF and destination ip address was changed from broadcast address to unicast address.

No I cannot receive and send new packets in my application. It must be forwarded.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.