Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

FTP Script and firewalls :(

Thread Tools
 
Search this Thread
 
Old 09 February 2006, 12:41 PM
  #1  
Stueyb
Scooby Regular
Thread Starter
 
Stueyb's Avatar
 
Join Date: May 2002
Posts: 1,893
Likes: 0
Received 0 Likes on 0 Posts
Default 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
Old 09 February 2006, 05:58 PM
  #2  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Default

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

What error is it failing with?
Old 09 February 2006, 06:02 PM
  #3  
jpor
Scooby Regular
iTrader: (1)
 
jpor's Avatar
 
Join Date: Sep 2003
Posts: 3,109
Likes: 0
Received 0 Likes on 0 Posts
Default

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.
Old 09 February 2006, 06:06 PM
  #4  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Default

Jpor,

I dont think that is simply the problem!

even allowing exceptions and trying to make it work in pasv mode.
Old 09 February 2006, 06:49 PM
  #5  
dowser
Scooby Senior
 
dowser's Avatar
 
Join Date: Oct 2000
Location: Zurich, Switzerland
Posts: 3,105
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Old 09 February 2006, 07:12 PM
  #6  
Stueyb
Scooby Regular
Thread Starter
 
Stueyb's Avatar
 
Join Date: May 2002
Posts: 1,893
Likes: 0
Received 0 Likes on 0 Posts
Default

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.
Old 09 February 2006, 07:32 PM
  #7  
jpor
Scooby Regular
iTrader: (1)
 
jpor's Avatar
 
Join Date: Sep 2003
Posts: 3,109
Likes: 0
Received 0 Likes on 0 Posts
Default

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?

I can only comment on what I have been given in the form of the information provided.
Old 10 February 2006, 09:36 AM
  #8  
dowser
Scooby Senior
 
dowser's Avatar
 
Join Date: Oct 2000
Location: Zurich, Switzerland
Posts: 3,105
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Old 10 February 2006, 08:02 PM
  #9  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Default

but he did say it didnt work either with an exception.
Old 10 February 2006, 08:30 PM
  #10  
jpor
Scooby Regular
iTrader: (1)
 
jpor's Avatar
 
Join Date: Sep 2003
Posts: 3,109
Likes: 0
Received 0 Likes on 0 Posts
Default

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

Wait for it

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

Again only going on the information the poster initially provided.
Old 10 February 2006, 09:05 PM
  #11  
mike1210
Scooby Regular
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes on 0 Posts
Default

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?

Last edited by mike1210; 10 February 2006 at 09:08 PM.
Old 10 February 2006, 09:07 PM
  #12  
Stueyb
Scooby Regular
Thread Starter
 
Stueyb's Avatar
 
Join Date: May 2002
Posts: 1,893
Likes: 0
Received 0 Likes on 0 Posts
Default

It worked fine with it off, and the ftp server in question, we own. In the end I changed it to use wget instead
Old 10 February 2006, 09:13 PM
  #13  
mike1210
Scooby Regular
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
dantiel
General Technical
8
29 September 2015 11:33 PM
ChristianR
Computer & Technology Related
6
31 December 2001 06:00 PM
mega_stream
Non Scooby Related
3
05 November 2001 06:22 PM



Quick Reply: FTP Script and firewalls :(



All times are GMT +1. The time now is 08:20 AM.