Cursed Checksums
Quoted 6 lines · Josan Kadett
In normal conditions, when NAT translates an IP header, it should do correct checksumming. However; when the source IP address of a packet is manipulated, Iptables still seems to use the "original" IP address and calculate the checksum accordingly. This way even if I use 3 three boxes;
Original Packet --> NAT 1 --> NAT 2 --> NAT3 --> Still incorrect checksum
Sure. That's why I think this is a job for ebtables.
Note: EBtables, not IPtables. This is lower level, dealing with raw Ethernet packets. It should be able to mangle anything in the packet.
Just as iptables lets you change any 32-bit value in an IP packet, ebtables should let you change any 32-bit value in an Ethernet packet. Unlike iptables, it could operate prior to the IP checksum verification.
Sadly, it looks like u32 mangle rules are missing.