I have a client and a server application working perfectly on my Lan but when I try to pass through my router's Wan address the client can connect, send all the bytes it asked to do but the server won't receive anything, recv() just hangs there.
Then after a while the connection drops and I get 10054 on the server recv() proving that it was connected.
Interestingly if I reverse the sending: server -> client the client can receive.
- Win7 firewall disabled
- no antivirus
- port opened on router
- tried different ports and different PCs
I installed Wireshark on both sides and it seems that after connection the router gets the 6 bytes "hello" message from the client but then both sides making a series of [PSH, ACK] retransmission:
Client: 192.168.1.3 -> wan address
Server: 192.168.1.1 -> wan address
192.168.1.3 -> 192.168.1.1 -> wan address -> 192.168.1.1 -> 192.168.1.8
So the router is trying to send it to the wan address who is supposed to send it to the 192.168.1.8 server address.
But the wan address is not responding back.
I dont know what to make of it. My ISP lets through torrent traffic so I dont understand why would he block this?