title: How do I block a loopback connection to some port on Windows?
body: <p>Adding an inbound Windows Firewall rule (via COM from C++) for local port 80 and addresses ANY, 127.0.0.1 or 0.0.0.0 does not block a local browser from accessing a local web server running on port 80. For debugging/testing purposes, I need to simulate loss of network connectivity between two programs running on the same computer. Is there a way to do this programmatically, on the command line, or with a tool?</p>
  
  <p>In this question, they say allegedly there is no way to do this in the Windows Firewall:</p>
  
  <p><a href="https://superuser.com/questions/401900/">How do I block localhost connections with the Windows 7/2008R2 firewall?</a></p>
  
  <p>Is there a way, other than Windows Firewall, just to simulate loss of network connectivity between programs running on the same computer?</p>