Packet forwarder (internet gateway) - TCP signature
Posted on 2008-10-22
I'm developing a packet forwarder application, how it works:
This application runs on IP 192.168.0.1 and all computers connected to this PC sets their internet gateway IP to 192.168.0.1. When they try to open google, my application receives their packet and sends it to real internet servers and receives response and sends response back to requester PC.
It works well if I have single IP/PC in my network, because I defined requesterIP as a global variable in my code and when I receive response I forward it back to requesterIP
Now when I have a lot of PCs in my network, I receive packets, I send them to google, google responds but I don't know to what IP I should forward it...
Please advice... How internet gateways work?
I have coded app using WinPcap, as I said it works, when I have single pc in my net...
Could I put a signature in sent packet, so google will response with same signature, so I can understand I should forward it back to which IP?
Thanks from now!