I have a redirect. I am trying to change the port on packets as I see them. When I do this - do I need to recount the TCP checksum and the IP checksum?
I try to do this, but I see reset packets in tcpdump. I do not know if this is because I am calculating the tcp checksum incorrectly or if something else is happening.
I used cksum methods from this site:
http://www.enderunix.org/docs/en/rawipspoof/
I thought using divert socket, if I changed something, it should be pretty simple, but it doesn't seem to be that way. is there a TCP checksum calculator that I can use to verify that I am getting the correct value?
Derek source share