Groups | Blog | Home
all groups > iis ftp > february 2006 >

iis ftp : Bug with W2K3, SP1, Windows Firewall and FTP


EuroMaverick
2/11/2006 11:35:30 AM
Hello people,

I don't know if this is a documented bug or if the information is wide
spread, but since we spend about two days tracking this down, I think it
makes sense to share this information with whoever is interested in it.

This is the setup where this will occur:
- Windows 2003 server with SP1
- Windows firewall turned on
- IIS on the same machine
- FTP within that IIS

Now, add a welcome message to the ftp. As soon as this welcome message
contains a <return>, your browser will hang when you navigate to the
ftp-site. It does not actually hang, but returns an error much later and your
ftp-site is not accessible.

Remove all returns from the welcome message, and the ftp-server works just
fine...

Regards,

Benoit Somers.
jeff.nospam NO[at]SPAM zina.com
2/16/2006 12:00:00 AM
On Sat, 11 Feb 2006 11:35:30 -0800, EuroMaverick
[quoted text, click to view]

Returns don't work in a welcome message. Text/Numeric/Space and some
other characters only. Technically, you can use a return but you have
to use a CrLf in the message, which is not the same as hitting the
Enter key.

EuroMaverick
2/19/2006 3:11:27 PM
Well yes, that's what I am saying. However, if you turn of the W2003
firewall, the returns *DO* work nicely and I think that could be considered
"unexpected behaviour"...

Mav.

[quoted text, click to view]
EuroMaverick
2/20/2006 5:52:27 AM
Yes, both ports are open.

I have only one system so I cannot replicate this on other equipment, but I
can very clearly trigger it on my server. There is not too much on that
machine either, so I am not thinking of other software immediately...

Mav.

[quoted text, click to view]
jeff.nospam NO[at]SPAM zina.com
2/20/2006 12:04:14 PM
On Sun, 19 Feb 2006 15:11:27 -0800, EuroMaverick
[quoted text, click to view]

The firewall affecting return characters is definitely unexpected.
Both 20 and 21 open on the firewall?

Jeff

[quoted text, click to view]
Jimmy Chu
4/8/2006 2:09:42 PM
I'm encountering a bad behavior with Windows Firewall on too. With the
Windows Firewall on, the FTP sessions (using the command line FTP on the
client) would be disconnected (the message says something about connection
disconnect by server) in about less than 1 minute, but the IIS manager would
still show the session is active. If the Windows Firewall is off,
everything is well.


[quoted text, click to view]

Bernard Cheah [MVP]
4/9/2006 12:34:01 PM

Weird indeed. same behavior if you try connect via ftp.exe on the machine
itself ??


--
Regards,
Bernard Cheah
http://www.iis-resources.com/
http://www.iiswebcastseries.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]

Jimmy Chu
4/10/2006 9:52:38 AM
You mean running FTP on the IIS/FTP server? Hmmm...I'll try that and let
you know the outcome.


[quoted text, click to view]

Bernard Cheah [MVP]
4/13/2006 12:00:00 AM
As for the FTP MMC connection status, I believe it is not refresh realtime.
so it may take someting to reflect even after the client has disconnected.

--
Regards,
Bernard Cheah
http://www.iis-resources.com/
http://www.iiswebcastseries.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]

Jimmy Chu
4/14/2006 2:22:30 PM
here is a refresh button. I could see the connection time updated after I
clicked the button. BTW, the client I used was the Microsoft FTP.exe.


[quoted text, click to view]

Jimmy Chu
4/17/2006 9:45:29 AM
From the Windows Firewall log, it looks like that the Firewall closes the
port 21 connection for some reasons. The client then gets the connection
disconnected by remote host/service not available, and since the server did
not get a proper response from the client, it is still waiting for the next
command (that's why the session is still going) until the session times out.
So the real question is why is the Windows Firewall doing this?

Oh, I also tested it from the server itself. Since the Firewall is not
involved in this case, everything went fine. Any thought on this Windows
Firewall behavior?


[quoted text, click to view]

Bernard Cheah [MVP]
4/17/2006 7:31:14 PM
Well, even with the refresh button. it's only as 'real' as you thought.
it will only 'clear' from the list when the tcp connection no longer appear
when you do 'netstat -an' at command prompt.
that's what I have tested in the past.

--
Regards,
Bernard Cheah
http://www.iis-resources.com/
http://www.iiswebcastseries.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]

Jimmy Chu
4/17/2006 9:02:27 PM
Hey Bernard, I found your Microsoft Help and Support article on configuring
PassivePortRange in IIS, and I also found this one on Windows 2003 Server
w/SP1 Firewall that basically says to do the same thing. Does it make
sense?

http://www.newagedigital.com/cgi-bin/newagedigital/articles/ms-firewall-ftp.html


[quoted text, click to view]

Jimmy Chu
4/18/2006 12:23:17 AM
I actually re-read those articles, and I realized that since ftp.exe is
using active, the PassivePortRange wouldn't fix the problem...


[quoted text, click to view]

Bernard Cheah [MVP]
4/18/2006 5:35:44 PM
Geezz. didn't know the reproduce my article.
Now - can you post the firewall log?
I can't repro this. I have firewall enable and I can connect fine. and only
idle timeout after 900 seconds.

--
Regards,
Bernard Cheah
http://www.iis-resources.com/
http://www.iiswebcastseries.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]

Jimmy Chu
4/18/2006 11:08:54 PM
Here is the log. At 22:56:06, the port 21 was closed, and when I entered a
"dir" command at the client FTP prompt, I got "Connection closed by remote
host." message.

2006-04-18 22:54:14 DROP UDP 206.190.85.61 255.255.255.255 1215 712
72 - - - - - - - RECEIVE
2006-04-18 22:54:15 OPEN-INBOUND TCP 68.190.234.108 206.190.85.61 4357
21 - - - - - - - - -
2006-04-18 22:54:29 DROP UDP 206.190.85.61 255.255.255.255 1218 712
72 - - - - - - - RECEIVE
2006-04-18 22:54:35 OPEN TCP 206.190.85.61 68.190.234.108 20
4373 - - - - - - - - -
2006-04-18 22:54:39 OPEN TCP 206.190.85.61 68.190.234.108 20
4376 - - - - - - - - -
2006-04-18 22:54:44 DROP UDP 206.190.85.61 255.255.255.255 1219 712
72 - - - - - - - RECEIVE
2006-04-18 22:54:45 OPEN TCP 206.190.85.61 68.190.234.108 20
4382 - - - - - - - - -
2006-04-18 22:54:50 OPEN TCP 206.190.85.61 68.190.234.108 20
4384 - - - - - - - - -
2006-04-18 22:54:51 OPEN TCP 206.190.85.61 68.190.234.108 20
4386 - - - - - - - - -
2006-04-18 22:54:54 OPEN TCP 206.190.85.61 68.190.234.108 20
4388 - - - - - - - - -
2006-04-18 22:54:59 DROP UDP 206.190.85.61 255.255.255.255 1220 712
72 - - - - - - - RECEIVE
2006-04-18 22:55:14 DROP UDP 206.190.85.61 255.255.255.255 1221 712
72 - - - - - - - RECEIVE
2006-04-18 22:55:29 DROP UDP 206.190.85.61 255.255.255.255 1222 712
72 - - - - - - - RECEIVE
2006-04-18 22:55:44 DROP UDP 206.190.85.61 255.255.255.255 1223 712
72 - - - - - - - RECEIVE
2006-04-18 22:55:59 DROP UDP 206.190.85.61 255.255.255.255 1224 712
72 - - - - - - - RECEIVE
2006-04-18 22:56:06 CLOSE TCP 68.190.234.108 206.190.85.61 4357
21 - - - - - - - - -
2006-04-18 22:56:14 DROP UDP 206.190.85.61 255.255.255.255 1225 712
72 - - - - - - - RECEIVE
2006-04-18 22:56:29 DROP UDP 206.190.85.61 255.255.255.255 1226 712
72 - - - - - - - RECEIVE
2006-04-18 22:56:44 DROP UDP 206.190.85.61 255.255.255.255 1227 712
72 - - - - - - - RECEIVE
2006-04-18 22:56:47 CLOSE TCP 206.190.85.61 68.190.234.108 20
4373 - - - - - - - - -
2006-04-18 22:56:48 OPEN-INBOUND TCP 68.190.234.108 206.190.85.61 4357
21 - - - - - - - - -
2006-04-18 22:56:50 CLOSE TCP 206.190.85.61 68.190.234.108 20
4376 - - - - - - - - -
2006-04-18 22:56:57 CLOSE TCP 206.190.85.61 68.190.234.108 20
4382 - - - - - - - - -


[quoted text, click to view]
Jimmy Chu
4/19/2006 9:38:03 AM
I only enabled the FTP Server service in advance settings. I also tried
adding a port 20 one for data, but it was no help.

[quoted text, click to view]
Bernard Cheah [MVP]
4/19/2006 9:12:27 PM
what is closed, not dropped :)
I have no clue already. how do you enable access for ftp in the firewall
setting?
just the 'network connection setting' in the firewall advanced tab or you
have exceptions define for inetinfo.exe ?

--
Regards,
Bernard Cheah
http://www.iis-resources.com/
http://www.iiswebcastseries.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]
Jimmy Chu
4/20/2006 3:45:21 PM
Bernard,

Are you running SP1?

[quoted text, click to view]
Bernard Cheah [MVP]
4/20/2006 5:03:36 PM
I can't find the 'utimate windows firewall troubleshooting kb' :)
I saw it few days ago. Now, part of the step. if some unknown issue is
blocking the incoming request.
create an exception for the program. in your case will be inetinfo.exe

ensure your ICF is on, then exception is allowed.

--
Regards,
Bernard Cheah
http://www.iis-resources.com/
http://www.iiswebcastseries.com/
http://msmvps.com/blogs/bernard/


[quoted text, click to view]