0

I have a program running and it connects to a UDP port to perform multi-casting. I'm trying to simulate a network failure where that process cannot reach the UDP endpoint but everything else still works.

I used CurrPorts but that allows me to forcibly close TCP connections, can't do much with UDP connections using that tool.

Is there a way I can simulate a network failure for just that port ?

george_h
  • 113
  • 7
  • No such thing as "UDP connections." UDP is a connection-less protocol. That's why your tool conspicuously lacks the ability to close UDP connections. – Ryan Ries Aug 13 '15 at 12:29

1 Answers1

2

UDP does not have connections, they are just packets that on their own has no relation between each other. However, what you can do to simulate network failure is to configure a firewall rule that will enable / disable the traffic over UDP protocol. You can configure which ports will be affected as well as which hosts will be affected, so this is exactly what you want to do.

If you are not sure how to add a firewall rule: Run "firewall.cpl" and click Advanced Settings and add your rule. Or visit e.g. this page with step by step instructions on how to add a rule:

http://www.howtogeek.com/112564/how-to-create-advanced-firewall-rules-in-the-windows-firewall/

Wapac
  • 652
  • 1
  • 5
  • 16
  • Possibly related: https://serverfault.com/questions/1058649/simulate-network-reset-or-failure-in-windows – fernacolo Mar 29 '21 at 02:31