2

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.

3 Answers 3

1

Problem solved. Restart windows, add rules to firewall settings, and it's good now.

0

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.

1
  • port 47808. I specify it. Yes, I run as administrator.
    – Jiechao Li
    Feb 14, 2014 at 0:47
0

Add to firewall

ANY ANY 255.255.255.255/32 DROP
ANY ANY a.b.c.255/32 DROP 

From: https://www.astaro.org/gateway-products/network-protection-firewall-nat-qos-ips/2568-how-block-broadcast-net-broadcast-packet-udp.html

1
  • Downvoted: this gives a method for causing OQ's problem, not solving it.
    – studog
    Sep 6, 2019 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.