This has been asked in stack overflow like 7 years back. I don't see the correct answer there. Is there any way to do this?
While this packet keeps on being transmitting, doesn't the other end see the port as being pseudo open? The application is configured to make sure only these ports as used using socket binding. I am unable to get it to work. The application is not connect to the server. On wireshark, (one is a server- which is not behind NAT), the other end is automatically sending the RST ACK (Closing the connection). How do I put in tcp-port-keepalive, so it doesn't close the connection?
Details: I have an application which works perfectly fine in a LAN. P2P.. Now I want it to work behind a NAT, such that a server is never needed. The application has a "server" side which uses port 12345 and the "client" side which uses port 12346. The idea here is to make the server which is actually behind a NAT, appear as if it's open. So as to achieve true peer to peer connection.