Forum Discussion
Hamish
Oct 18, 2016Cirrocumulus
You can indeed use TCP option headers to add the source IP if you're doing SNAT. There's an example in the TCP options documentation page. Sometimes called option 28 stuffing...
However UDP you're pretty much out of luck. There's nowhere really to stuff the info with UDP. Unless you're app is flexible enough for you to add it as the first 4 bytes of the datagram and shift everything along... That would require a bit of work though, and an assumption that the original datagram was also at least 4 Bytes less than the max...