The Windows 7 Firewall is running with default options to allow outbound connections and block incoming connections. I have a process trying to connect regularly from within my local network, which is fine. When the program that accepts the connection is running, all goes well. When it's not, Windows 7 Firewall is causing the connection attempt to time out instead of refusing the connection (like it should be doing).

I've tried creating rules to explicitly allow all connections on that port, but it's timing out none-the-less. I'm wondering if the firewall is blocking the RST packet from being sent back? Disabling the public profile completely causes the connection to be refused (as expected) but a firewall rule does not.

Here is the rules I've tried so far without success:

Port type, TCP, Specified port 11211, Allow the connection, apply to Domain, Private, and Public

Any suggestions?

[Edit] When I say "refused" I'm referring to the operating system's response to the connection saying "sorry, nothing is listening." Test this out on your local machine. Open a command prompt and type telnet localhost 60000. You should see something like this: Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused

This is a connection refused. The operating system is "refusing" the request, because (at least on my system) nothing is listening on port 60000.

Now try telnet example.com 60000. Wait. You'll eventually see something like this: Trying 192.0.43.10... telnet: connect to address 192.0.43.10: Operation timed out

See the difference? There is no host at example.com to reply with a "refused" so your local operating system (e.g. not the server) says "nothing is there, timeout."

Very different. The problem is Windows 7 firewall is not generating the "refused" as it should be. I'd like to find out how to fix this. [/Edit]

link|improve this question
If you fully disable the firewall do you get the expected/wanted behaviour? – techie007 Nov 10 '11 at 18:30
I'm also a little confused as to what you think would "Refuse" the connection if there's no firewall in the way (due to rules), and no server listening? – techie007 Nov 10 '11 at 18:44
The connection being "timed out" sounds like the connection is being refused. I don't understand the difference. – Ramhound Nov 10 '11 at 19:29
The connection "timing out" is different than the connection being "refused." A refused response is the OS saying "nothing is listening on that port, so you cannot connect," vs. a timeout which has no response at all. The server takes care of refusals, the client takes care of timeouts. Significant difference there. – JT. Dec 7 '11 at 1:38
What is your basis for saying the Win Firewall "should" be sending Connection Refused messages? I've always understood firewalls to be mere filters, allowing or dropping packets, but not generating any traffic of their own. – kreemoweet Feb 17 at 19:54
show 1 more comment
feedback

1 Answer

up vote 1 down vote accepted

Reason - http://technet.microsoft.com/en-us/library/dd448557%28WS.10%29

Fix - http://msdn.microsoft.com/en-us/library/ff720058%28v=prot.10%29.aspx

If Keys/values don't exist - create it. After changes need to restart windows firewall service.

link|improve this answer
Could you explain the fix here? We generally prefer a summary as opposed to just links – Simon Sheehan Feb 17 at 20:47
That's exactly it! I can't vote up because I don't have enough reputation, but the fix did exactly what was needed! Keys: Software\Policies\Microsoft\WindowsFirewall\DomainProfile, Software\Policies\Microsoft\WindowsFirewall\PrivateProfile, Software\Policies\Microsoft\WindowsFirewall\PublicProfile, Software\Policies\Microsoft\WindowsFirewall\StandardProfile Value: "DisableStealthMode" Type: REG_DWORD. Size: Equal to size of the Data field. Data: 0x00000001 means TRUE and 0x00000000 means FALSE. – JT. Feb 17 at 22:15
feedback

Your Answer

 
or
required, but never shown

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