Reputation: 366
I am running a client application on my Windows 7 machine, it sends a UDP message to another server machine on the local subnet, then server reply with a broadcast UDP message with destination of '192.168.1.255'. The strange thing is that my client application on Windows cannot get the message. I have tried to let the server send a unicast message directly to the ip of my windows machine '192.168.1.8', then the client can get it. I tracked the message using WireShark, and I can see the IP packet sent to '192.168.1.255' but my application cannot get it.
So I believe Windows 7 block the broadcast message in the sub network. I turned off the windows firewall, but it still does not work.
I am almost sure that it's windows's problem, I run the exact same code on another Linux machine in the same subnet, it works good.
Can anyone help me how to solve this problem? Thanks a lot.
Upvotes: 2
Views: 12160
Reputation: 5900
Add to firewall
ANY ANY 255.255.255.255/32 DROP
ANY ANY a.b.c.255/32 DROP
Upvotes: 0
Reputation: 366
Problem solved. Restart windows, add rules to firewall settings, and it's good now.
Upvotes: 1
Reputation: 385
What port number are you using to listen for the message? Did you explicitly specify the port number or was it auto assigned by the socket? You need to have administrator rights to specify a port number to listen to on Windows.
Upvotes: 0