I’m programming an Android application. I forward a port to my app and listen on it with a socket. I’m receiving data but only the data on the layers OVER the TCP-layer. That would not be a problem, but now I need the original destination-IP but it should be in the TCP-Layer. So do you know, is there an easy way to get this IP?
Or is there an easy way to set up a socket to get more layers than only that ones over TCP?
I’m programming an Android application. I forward a port to my app and listen
Share
If you are forwarding TCP port on a NAT device, then the information you are looking for is not available at the NAT-ed destination, since destination address needs to be overwritten in the IP header to the private address in order for this to work.