Reputation: 16821
I'm developing an Android app that communicates with a desktop .NET application through tcp sockets. But I'm facing an issue with computer's firewall. The applications act both as servers and clients, and they listen to port 50655.
The communication is working, I can successfully send a tcp message from Android to PC, and from PC to Android, but only as long as the Firewall is disabled.
If I turn on the firewall, the PC can still send messages to Android, but the Android application throws a timeout exception on the creation of the socket:
Socket s = new Socket("192.168.1.116", 50655); // This times out when Firewall is active
And yes, I have added a firewall exception for this port:
I have worked with TCP communication before, but I just can't figure this one out... Have anyone else experienced something like it? Am I missing something here?
Upvotes: 1
Views: 3140
Reputation: 814
Please check the following in the window you have open in the screenshot
If none of those work, you may have a different Block rule that is taking priority over the Allow. If there are two rules on the same port a Block takes priority. Try looking for that.
Once you have all of those settings it should work. Once it is working you can reduce the openings to just what you need to increase security. So once it is working I recommend just making it the specific program, specific IP (if possible), and specific profile of your network.
Upvotes: 1