ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   FTP Script and firewalls :( (https://www.scoobynet.com/computer-and-technology-related-34/491105-ftp-script-and-firewalls.html)

Stueyb 09 February 2006 12:41 PM

FTP Script and firewalls :(
 
Hi Everyone.

I have a problem with XP2 firewalls and this ftp script im running.

Basically the script is a batch file that runs an ftp -s:script.txt command and then decompresses the file on the local hard drive.

It has worked well for months, if not years, but the ftp part of it dies a death if XP2 firewall is turned on, even allowing exceptions and trying to make it work in pasv mode.

Has anyone had this problem and if so how did they fix it.?

Cheers

Stuart

David_Wallis 09 February 2006 05:58 PM

are you running it as a different user? (not that it should matter)

What error is it failing with?

jpor 09 February 2006 06:02 PM


Originally Posted by Stueyb
Hi Everyone.

I have a problem with XP2 firewalls and this ftp script im running.

Basically the script is a batch file that runs an ftp -s:script.txt command and then decompresses the file on the local hard drive.

It has worked well for months, if not years, but the ftp part of it dies a death if XP2 firewall is turned on, even allowing exceptions and trying to make it work in pasv mode.

Has anyone had this problem and if so how did they fix it.?

Cheers

Stuart

Theres your problem. XP Firewall ain't great in selecting to open up ports. Which FTP needs port 21 opening to work correctly.
Best getting hold of some decent firewall software.

David_Wallis 09 February 2006 06:06 PM

Jpor,

I dont think that is simply the problem!


even allowing exceptions and trying to make it work in pasv mode.

dowser 09 February 2006 06:49 PM

Don't really know how XP firewall works - I assume by default it allows outgoing connections only and tracks established connections? As your FTP session is established by XP, it should be allowed (unless your script, or the FTP server, is doing something to check who you are).

Best is to enable logging and then step through the script manually to see where the block is happening. FTP is tcp/21 (by default) - also note that FTP is very insecure; the username/password is sent in clear text.

Side note, but off topic: worse is that if the ftp server you're logging into is a Windows box, it is likely the account being used is an actual Windows OS level account too....... 'Manna from heaven' if you wear a black hat :) There are a number of freeware SecureFTP solutions out there - try ssh.com (Secure Shell) suite.

Richard

Stueyb 09 February 2006 07:12 PM

Hi peeps,

The error Im getting is "Session closed by remote host" no matter what you do.

What I have done temporarily is use wget to get the files onto the hard drive via http but it aint ideal.

jpor 09 February 2006 07:32 PM


Originally Posted by David_Wallis
Jpor,

I dont think that is simply the problem!

Hold on a minute! If I'm reading this correctly from the poster:


I have a problem with XP2 firewalls and this ftp script im running.

It has worked well for months, if not years, but the ftp part of it dies a death if XP2 firewall is turned on
Ummmm... Mind reader are you? :cuckoo:

I can only comment on what I have been given in the form of the information provided. :nono:

dowser 10 February 2006 09:36 AM

Do you use a password in the script, or is the server trying to authenticate you at a Windows OS level? Sounds to me like FTP server is trying to establish a connection with you, which the firewall is not allowing, and it therefore close the session down.

Don't know how you do it with XP, but enable full logging briefly on your XP firewall while you manually try it again, then review the logfiles. Other option is to use a sniffer.

Richard

David_Wallis 10 February 2006 08:02 PM

but he did say it didnt work either with an exception.

jpor 10 February 2006 08:30 PM


Originally Posted by David_Wallis
but he did say it didnt work either with an exception.

Which means ...............?

Wait for it :wonder:

That's right....... he is still running the XP firewall in the on position.

Again only going on the information the poster initially provided.

mike1210 10 February 2006 09:05 PM

yes the sp2 firewall is stateful and tracks outgoing connections and allows connections back. Only incoming connections can be blocked. Outgoing is all allowed

Does it work with it off?????

A Session closed by remote host may mean its thier end (dying connection, password problem etc)

FTP has 2 ports data and control being TCP 20 and 21, however ive noticed running netstat commands that it also sends out a syn packet on high up ports like TCP 18000 etc

do you connect to the net directly (modem) or behind a router?

Stueyb 10 February 2006 09:07 PM

It worked fine with it off, and the ftp server in question, we own. In the end I changed it to use wget instead

mike1210 10 February 2006 09:13 PM

taken from MS site

After you install Windows XP SP2, client applications may not successfully receive data from a server. Following are some examples: •An FTP client•Multimedia streaming software•New mail notifications in some e-mail programs

article may be of use

http://support.microsoft.com/kb/842242


All times are GMT +1. The time now is 02:38 AM.


© 2024 MH Sub I, LLC dba Internet Brands